mount.c (241680) | mount.c (250235) |
---|---|
1/*- 2 * Copyright (c) 1980, 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32"@(#) Copyright (c) 1980, 1989, 1993, 1994\n\ 33 The Regents of the University of California. All rights reserved.\n"; 34#if 0 35static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; 36#endif 37#endif /* not lint */ 38 39#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1980, 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32"@(#) Copyright (c) 1980, 1989, 1993, 1994\n\ 33 The Regents of the University of California. All rights reserved.\n"; 34#if 0 35static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; 36#endif 37#endif /* not lint */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sbin/mount/mount.c 241680 2012-10-18 12:04:56Z attilio $"); | 40__FBSDID("$FreeBSD: head/sbin/mount/mount.c 250235 2013-05-04 14:00:16Z crees $"); |
41 42#include <sys/param.h> 43#include <sys/mount.h> 44#include <sys/stat.h> 45#include <sys/wait.h> 46 47#include <ctype.h> 48#include <err.h> --- 191 unchanged lines hidden (view full) --- 240 241int 242main(int argc, char *argv[]) 243{ 244 const char *mntfromname, **vfslist, *vfstype; 245 struct fstab *fs; 246 struct statfs *mntbuf; 247 int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro; | 41 42#include <sys/param.h> 43#include <sys/mount.h> 44#include <sys/stat.h> 45#include <sys/wait.h> 46 47#include <ctype.h> 48#include <err.h> --- 191 unchanged lines hidden (view full) --- 240 241int 242main(int argc, char *argv[]) 243{ 244 const char *mntfromname, **vfslist, *vfstype; 245 struct fstab *fs; 246 struct statfs *mntbuf; 247 int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro; |
248 int onlylate; |
|
248 char *cp, *ep, *options; 249 | 249 char *cp, *ep, *options; 250 |
250 all = init_flags = late = 0; | 251 all = init_flags = late = onlylate = 0; |
251 ro = 0; 252 options = NULL; 253 vfslist = NULL; 254 vfstype = "ufs"; | 252 ro = 0; 253 options = NULL; 254 vfslist = NULL; 255 vfstype = "ufs"; |
255 while ((ch = getopt(argc, argv, "adF:flo:prt:uvw")) != -1) | 256 while ((ch = getopt(argc, argv, "adF:fLlo:prt:uvw")) != -1) |
256 switch (ch) { 257 case 'a': 258 all = 1; 259 break; 260 case 'd': 261 debug = 1; 262 break; 263 case 'F': 264 setfstab(optarg); 265 break; 266 case 'f': 267 init_flags |= MNT_FORCE; 268 break; | 257 switch (ch) { 258 case 'a': 259 all = 1; 260 break; 261 case 'd': 262 debug = 1; 263 break; 264 case 'F': 265 setfstab(optarg); 266 break; 267 case 'f': 268 init_flags |= MNT_FORCE; 269 break; |
270 case 'L': 271 onlylate = 1; 272 late = 1; 273 break; |
|
269 case 'l': 270 late = 1; 271 break; 272 case 'o': 273 if (*optarg) { 274 options = catopt(options, optarg); 275 if (specified_ro(optarg)) 276 ro = 1; --- 45 unchanged lines hidden (view full) --- 322 if (all) { 323 while ((fs = getfsent()) != NULL) { 324 if (BADTYPE(fs->fs_type)) 325 continue; 326 if (checkvfsname(fs->fs_vfstype, vfslist)) 327 continue; 328 if (hasopt(fs->fs_mntops, "noauto")) 329 continue; | 274 case 'l': 275 late = 1; 276 break; 277 case 'o': 278 if (*optarg) { 279 options = catopt(options, optarg); 280 if (specified_ro(optarg)) 281 ro = 1; --- 45 unchanged lines hidden (view full) --- 327 if (all) { 328 while ((fs = getfsent()) != NULL) { 329 if (BADTYPE(fs->fs_type)) 330 continue; 331 if (checkvfsname(fs->fs_vfstype, vfslist)) 332 continue; 333 if (hasopt(fs->fs_mntops, "noauto")) 334 continue; |
335 if (!hasopt(fs->fs_mntops, "late") && onlylate) 336 continue; |
|
330 if (hasopt(fs->fs_mntops, "late") && !late) 331 continue; 332 if (hasopt(fs->fs_mntops, "failok")) 333 failok = 1; 334 else 335 failok = 0; 336 if (!(init_flags & MNT_UPDATE) && 337 ismounted(fs, mntbuf, mntsize)) --- 609 unchanged lines hidden --- | 337 if (hasopt(fs->fs_mntops, "late") && !late) 338 continue; 339 if (hasopt(fs->fs_mntops, "failok")) 340 failok = 1; 341 else 342 failok = 0; 343 if (!(init_flags & MNT_UPDATE) && 344 ismounted(fs, mntbuf, mntsize)) --- 609 unchanged lines hidden --- |