Magellan Linux

Annotation of /trunk/util-linux/patches/util-linux-2.12q-more-fake-checks-v2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years, 1 month ago) by niro
File size: 1176 byte(s)
-import

1 niro 153 > Running `mount -fv /mnt/pnt` incorrectly updates /etc/mtab
2    
3     This one is bogus.
4    
5     Manpage:
6    
7     =====
8     -f Causes everything to be done except for the actual system call;
9     if it's not obvious, this ``fakes'' mounting the file system. This option
10     is useful in conjunction with the -v flag to determine what the mount
11     command is trying to do. It can also be used to add entries for devices that
12     were mounted earlier with the -n option.
13     =====
14    
15     Also, we need it in /etc/init.d/checkroot to regen /etc/mtab ...
16    
17    
18     =======================================================================
19     Running `mount -afvt type` incorrectly warns that 'nothing was mounted'
20    
21     --- mount/mount.c
22     +++ mount/mount.c
23     #@@ -659,7 +659,7 @@
24     # if (verbose)
25     # print_one (&mnt);
26     #
27     #- if (!nomtab && mtab_is_writable()) {
28     #+ if (!fake && !nomtab && mtab_is_writable()) {
29     # if (flags & MS_REMOUNT)
30     # update_mtab (mnt.mnt_dir, &mnt);
31     # else {
32     @@ -1629,7 +1629,7 @@
33     case 0:
34     /* mount -a */
35     result = do_mount_all (types, options, test_opts);
36     - if (result == 0 && verbose)
37     + if (result == 0 && verbose && !fake)
38     error(_("nothing was mounted"));
39     break;
40