projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not trim leading pathname from special device name
[unix-history]
/
usr
/
src
/
sbin
/
mount
/
mount.c
diff --git
a/usr/src/sbin/mount/mount.c
b/usr/src/sbin/mount/mount.c
index
d91acb5
..
262e57b
100644
(file)
--- a/
usr/src/sbin/mount/mount.c
+++ b/
usr/src/sbin/mount/mount.c
@@
-22,7
+22,7
@@
char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mount.c 5.2
6
(Berkeley) %G%";
+static char sccsid[] = "@(#)mount.c 5.2
7
(Berkeley) %G%";
#endif /* not lint */
#include "pathnames.h"
#endif /* not lint */
#include "pathnames.h"
@@
-334,18
+334,9
@@
prmount(spec, name, flags)
char *spec, *name;
long flags;
{
char *spec, *name;
long flags;
{
- register char *root;
if (opflags & ISBGRND)
return;
if (opflags & ISBGRND)
return;
- /*
- * trim trailing /'s and find last component of name
- */
- for (root = index(spec, '\0'); *--root == '/';)
- /* void */;
- *++root = '\0';
- if (root = rindex(spec, '/'))
- spec = root + 1;
printf("%s on %s", spec, name);
if (flags & M_RDONLY)
printf(" (read-only)");
printf("%s on %s", spec, name);
if (flags & M_RDONLY)
printf(" (read-only)");