diff options
-rw-r--r-- | lib/mountlist.c | 62 | ||||
-rw-r--r-- | old/fileutils/ChangeLog | 14 |
2 files changed, 5 insertions, 71 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c index 760ef08e5..138fd2272 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -151,48 +151,6 @@ xatoi (char *cp) } return val; } - -/* Convert, in place, each unambiguous `\040' sequence in the NUL-terminated - string, STR, to a single space. `unambiguous' means that it must not be - immediately preceded by an odd number of backslash characters. */ -/* FIXME: should any other backslash-escaped sequences be translated? */ -/* FIXME: is the backslash counting necessary? */ - -static void -translate_040_to_space (char *str) -{ - while (1) - { - char *p; - char *backslash = strstr (str, "\\040"); - unsigned int backslash_count = 0; - - if (backslash == NULL) - break; - - /* Count preceding backslashes, going no further than str. */ - for (p = backslash - 1; p >= str && *p == '\\'; p--) - ++backslash_count; - - if (backslash_count % 2 == 1) - { - /* The backslash is escaped; advance past the 040 and - continue searching. */ - str = backslash + 4; - continue; - } - - /* We found an unambiguous `\040'. Replace the `/' with a space - and shift the string after `040' so that it starts where the - first zero was. The source and destination regions may overlap, - so use memmove. */ - *backslash = ' '; - str = backslash + 1; - /* Be sure to copy the trailing NUL byte, too. */ - memmove (str, backslash + 4, strlen (backslash + 4) + 1); - } -} - #endif /* MOUNTED_GETMNTENT1. */ #if MOUNTED_GETMNTINFO @@ -391,11 +349,6 @@ read_filesystem_list (int need_fs_type) else me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - /* FIXME: do the conversion only if we're using some version of - GNU libc -- which one? */ - /* Convert each `\040' string to a space. */ - translate_040_to_space (me->me_mountdir); - /* Add to the linked list. */ *mtail = me; mtail = &me->me_next; @@ -719,18 +672,3 @@ read_filesystem_list (int need_fs_type) return NULL; } } - -#ifdef TEST -int -main (int argc, char **argv) -{ - int i; - for (i = 1; i < argc; i++) - { - char *p = xstrdup (argv[i]); - translate_040_to_space (p); - printf ("%s: %s\n", argv[i], p); - } - exit (0); -} -#endif diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog index 41d232836..6ca4dd85f 100644 --- a/old/fileutils/ChangeLog +++ b/old/fileutils/ChangeLog @@ -1,20 +1,16 @@ +1999-07-24 Jim Meyering <meyering@ascend.com> + + * src/dd.c (PTR_ALIGN, ROUND_UP_OFFSET): New macros. + (dd_copy): Use those to page-align both the input and output buffers. + 1999-06-01 Volker Borchert <bt@teknon.de> * tests/Makefile.am: Make envvar-check depend on check-recursive rather than on `check' so that its tests are performed before any real tests. -1999-07-20 Jim Meyering <meyering@ascend.com> - - Handle the `\040' that Linux puts in mount dir names containing spaces. - - * lib/mountlist.c (translate_040_to_space) [MOUNTED_GETMNTENT1]: - New function. - (read_filesystem_list) [MOUNTED_GETMNTENT1]: Use it. - 1999-07-15 Jim Meyering <meyering@ascend.com> * src/dd.c: Include getpagesize.h. - (ROUND_UP_TO_MODULUS): Define. (dd_copy): Page-align the input buffer. Based on a patch from Scott Lurndal. |