aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authortimr <timr@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-25 00:08:53 +0000
committertimr <timr@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-25 00:08:53 +0000
commitfd8222f9b9db2a783b17ec9c59cf3fc22a4e4586 (patch)
tree5f329b7d0c7f20ecced0dc7581a9ba6dc720d965 /util-linux/mount.c
parent45d75f9ecc8f2b582407059da7d414f990ced68a (diff)
downloadbusybox-w32-fd8222f9b9db2a783b17ec9c59cf3fc22a4e4586.tar.gz
busybox-w32-fd8222f9b9db2a783b17ec9c59cf3fc22a4e4586.tar.bz2
busybox-w32-fd8222f9b9db2a783b17ec9c59cf3fc22a4e4586.zip
just whitespace
git-svn-id: svn://busybox.net/trunk/busybox@13584 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4777e470b..68542f9bc 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -32,7 +32,7 @@
32 32
33/* Consume standard mount options (from -o options or --options). 33/* Consume standard mount options (from -o options or --options).
34 * Set appropriate flags and collect unrecognized ones as a comma separated 34 * Set appropriate flags and collect unrecognized ones as a comma separated
35 * string to pass to kernel */ 35 * string to pass to kernel */
36 36
37struct { 37struct {
38 const char *name; 38 const char *name;
@@ -104,7 +104,7 @@ extern int mount_main(int argc, char **argv)
104 *loopFile = 0, *buf = 0, 104 *loopFile = 0, *buf = 0,
105 *files[] = {"/etc/filesystems", "/proc/filesystems", 0}; 105 *files[] = {"/etc/filesystems", "/proc/filesystems", 0};
106 int i, opt, all = FALSE, fakeIt = FALSE, allowWrite = FALSE, 106 int i, opt, all = FALSE, fakeIt = FALSE, allowWrite = FALSE,
107 rc = 1, useMtab = ENABLE_FEATURE_MTAB_SUPPORT; 107 rc = 1, useMtab = ENABLE_FEATURE_MTAB_SUPPORT;
108 int flags=0xc0ed0000; // Needed for linux 2.2, ignored by 2.4 and 2.6. 108 int flags=0xc0ed0000; // Needed for linux 2.2, ignored by 2.4 and 2.6.
109 FILE *file = 0,*f = 0; 109 FILE *file = 0,*f = 0;
110 char path[PATH_MAX*2]; 110 char path[PATH_MAX*2];
@@ -185,7 +185,7 @@ extern int mount_main(int argc, char **argv)
185 statbuf.st_mode=0; 185 statbuf.st_mode=0;
186 if(optind < argc) 186 if(optind < argc)
187 blockDevice = !stat(argv[optind], &statbuf) ? 187 blockDevice = !stat(argv[optind], &statbuf) ?
188 bb_simplify_path(argv[optind]) : 188 bb_simplify_path(argv[optind]) :
189 (ENABLE_FEATURE_CLEAN_UP ? strdup(argv[optind]) : argv[optind]); 189 (ENABLE_FEATURE_CLEAN_UP ? strdup(argv[optind]) : argv[optind]);
190 if(optind+1 < argc) directory = bb_simplify_path(argv[optind+1]); 190 if(optind+1 < argc) directory = bb_simplify_path(argv[optind+1]);
191 191
@@ -206,7 +206,7 @@ extern int mount_main(int argc, char **argv)
206 bb_perror_msg("Can't find %s in /etc/fstab\n", blockDevice); 206 bb_perror_msg("Can't find %s in /etc/fstab\n", blockDevice);
207 break; 207 break;
208 } 208 }
209 209
210 // If we're mounting all and all doesn't mount this one, skip it. 210 // If we're mounting all and all doesn't mount this one, skip it.
211 211
212 if(all) { 212 if(all) {
@@ -271,7 +271,7 @@ singlemount:
271 goto mount_it_now; 271 goto mount_it_now;
272 } 272 }
273 } else { 273 } else {
274 274
275 // Do we need to allocate a loopback device? 275 // Do we need to allocate a loopback device?
276 276
277 if(ENABLE_FEATURE_MOUNT_LOOP && !fakeIt && S_ISREG(statbuf.st_mode)) 277 if(ENABLE_FEATURE_MOUNT_LOOP && !fakeIt && S_ISREG(statbuf.st_mode))
@@ -297,7 +297,7 @@ singlemount:
297 if(fsType || (flags & (MS_REMOUNT | MS_BIND | MS_MOVE))) 297 if(fsType || (flags & (MS_REMOUNT | MS_BIND | MS_MOVE)))
298 goto mount_it_now; 298 goto mount_it_now;
299 } 299 }
300 300
301 // Loop through filesystem types until mount succeeds or we run out 301 // Loop through filesystem types until mount succeeds or we run out
302 302
303 for(i = 0; files[i] && rc; i++) { 303 for(i = 0; files[i] && rc; i++) {
@@ -305,11 +305,11 @@ singlemount:
305 if(!f) continue; 305 if(!f) continue;
306 // Get next block device backed filesystem 306 // Get next block device backed filesystem
307 for(buf = 0; (buf = fsType = bb_get_chomped_line_from_file(f)); 307 for(buf = 0; (buf = fsType = bb_get_chomped_line_from_file(f));
308 free(buf)) 308 free(buf))
309 { 309 {
310 // Skip funky entries in /proc 310 // Skip funky entries in /proc
311 if(!strncmp(buf,"nodev",5) && isspace(buf[5])) continue; 311 if(!strncmp(buf,"nodev",5) && isspace(buf[5])) continue;
312 312
313 while(isspace(*fsType)) fsType++; 313 while(isspace(*fsType)) fsType++;
314 if(*buf=='#' || *buf=='*') continue; 314 if(*buf=='#' || *buf=='*') continue;
315 if(!*fsType) continue; 315 if(!*fsType) continue;