diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-03 11:10:13 -0400 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-03 17:17:57 +0200 |
commit | 2f1a50d81671810256dce0852e6b1e0810ac44af (patch) | |
tree | c6058422a2f177f7c55ddaa22e329699a9d21e20 /daemon/mount.c | |
parent | 72c829395bb6a4800516d4f535e18af48195585b (diff) | |
download | libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.gz libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.tar.xz libguestfs-2f1a50d81671810256dce0852e6b1e0810ac44af.zip |
Convert all TABs-as-indentation to spaces.
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]
git ls-files \
| pcregrep -vf .x-sc_TAB_in_indentation \
| xargs pcregrep -l '^ *\t' \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'daemon/mount.c')
-rw-r--r-- | daemon/mount.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/daemon/mount.c b/daemon/mount.c index e7265fe2..9754ca9a 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -42,7 +42,7 @@ int root_mounted = 0; int do_mount_vfs (char *options, char *vfstype, - char *device, char *mountpoint) + char *device, char *mountpoint) { int r, is_root; char *mp; @@ -65,10 +65,10 @@ do_mount_vfs (char *options, char *vfstype, if (vfstype) r = command (NULL, &error, - "mount", "-o", options, "-t", vfstype, device, mp, NULL); + "mount", "-o", options, "-t", vfstype, device, mp, NULL); else r = command (NULL, &error, - "mount", "-o", options, device, mp, NULL); + "mount", "-o", options, device, mp, NULL); free (mp); if (r == -1) { reply_with_error ("mount: %s on %s: %s", device, mountpoint, error); @@ -96,7 +96,7 @@ do_mount_ro (char *device, char *mountpoint) int do_mount_options (char *options, char *device, - char *mountpoint) + char *mountpoint) { return do_mount_vfs (options, NULL, device, mountpoint); } @@ -176,22 +176,22 @@ mounts_or_mountpoints (int mp) if (p2 != NULL) { *p2 = '\0'; if (add_string (&ret, &size, &alloc, p) == -1) { - free (out); - return NULL; + free (out); + return NULL; } if (mp) { - p2 += 4 + sysroot_len; /* skip " on /sysroot" */ - len = strcspn (p2, " "); - - if (len == 0) /* .. just /sysroot, so we turn it into "/" */ - p2 = (char *) "/"; - else - p2[len] = '\0'; - - if (add_string (&ret, &size, &alloc, p2) == -1) { - free (out); - return NULL; - } + p2 += 4 + sysroot_len; /* skip " on /sysroot" */ + len = strcspn (p2, " "); + + if (len == 0) /* .. just /sysroot, so we turn it into "/" */ + p2 = (char *) "/"; + else + p2[len] = '\0'; + + if (add_string (&ret, &size, &alloc, p2) == -1) { + free (out); + return NULL; + } } } @@ -277,8 +277,8 @@ do_umount_all (void) p3 = p2 + strcspn (p2, " "); *p3 = '\0'; if (add_string (&mounts, &size, &alloc, p2) == -1) { - free (out); - return -1; + free (out); + return -1; } } |