diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
| commit | 73dd3167345391095dd7c75aefa870a5bce92397 (patch) | |
| tree | 33cadf04c808cb0644aedaa306f8f3c0987ba3fe /sbin/mount_null | |
| parent | 1d64c295bbdb773ca3d62cdb5a9eec06e12799c8 (diff) | |
Notes
Diffstat (limited to 'sbin/mount_null')
| -rw-r--r-- | sbin/mount_null/mount_null.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/mount_null/mount_null.c b/sbin/mount_null/mount_null.c index a866e385f9fad..cf6120863bac3 100644 --- a/sbin/mount_null/mount_null.c +++ b/sbin/mount_null/mount_null.c @@ -97,11 +97,9 @@ main(argc, argv) if (argc != 2) usage(); - if (realpath(argv[0], target) == 0) - err(EX_OSERR, "%s", target); - - if (realpath(argv[1], source) == 0) - err(EX_OSERR, "%s", source); + /* resolve target and source with realpath(3) */ + (void)checkpath(argv[0], target); + (void)checkpath(argv[1], source); if (subdir(target, source) || subdir(source, target)) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", |
