Re: [ANNOUNCE] HFS+ driver

J.A. Magallon (jamagallon@able.es)
Thu, 8 May 2003 23:34:01 +0200


On 05.07, Roman Zippel wrote:
> Hi,
>
> I'm proud to announce a complete new version of the HFS+ fs driver. This
> work was made possible by Ardis Technologies (www.ardistech.com). It's
> based on the driver by Brad Boyer (http://sf.net/projects/linux-hfsplus).
>

How about this ?

--- fs/hfsplus/options.c.orig 2003-05-08 23:28:09.000000000 +0200
+++ fs/hfsplus/options.c 2003-05-08 23:30:28.000000000 +0200
@@ -47,23 +47,6 @@
}
#endif

-/* My own little ultra-paranoid version of strtok (yes, there is strtok...) */
-static char *my_strtok(char *input, char **next, char delim)
-{
- char *d;
-
- if (!input || !*input || !next)
- return NULL;
-
- *next = NULL;
- d = strchr(input, delim);
- if (d) {
- *d = '\0';
- *next = d+1;
- }
- return input;
-}
-
/* convert a "four byte character" to a 32 bit int with error checks */
static int fill_fourchar(u32 *result, char *input)
{
@@ -102,14 +85,16 @@
/* input is the options passed to mount() as a string */
int parse_options(char *input, struct hfsplus_sb_info *results)
{
- char *next, *curropt, *value;
+ char *curropt, *value;
int tmp;

if (!input)
return 1;

- for (curropt = my_strtok(input, &next, ','); curropt != NULL;
- curropt = my_strtok(next, &next, ',')) {
+ while ((curropt = strsep(&input,",")) != NULL) {
+ if (!*curropt)
+ continue;
+
if ((value = strchr(curropt, '=')) != NULL)
*value++ = '\0';

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-rc1-jam2 (gcc 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/