Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/newfs_msdos * expand device name to raw device, not blo...



details:   https://anonhg.NetBSD.org/src/rev/8342e371987b
branches:  trunk
changeset: 514793:8342e371987b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Sep 10 19:25:35 2001 +0000

description:
* expand device name to raw device, not block device (eg. wd0a -> /dev/rwd0a)
* #ifdef non-relevant FreeBSD slice consistency check

diffstat:

 sbin/newfs_msdos/newfs_msdos.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 5760f102ea78 -r 8342e371987b sbin/newfs_msdos/newfs_msdos.c
--- a/sbin/newfs_msdos/newfs_msdos.c    Mon Sep 10 18:27:41 2001 +0000
+++ b/sbin/newfs_msdos/newfs_msdos.c    Mon Sep 10 19:25:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newfs_msdos.c,v 1.7 2001/09/10 18:27:42 christos Exp $ */
+/*     $NetBSD: newfs_msdos.c,v 1.8 2001/09/10 19:25:35 pooka Exp $    */
 
 /*
  * Copyright (c) 1998 Robert Nordier
@@ -33,7 +33,7 @@
 static const char rcsid[] =
   "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
 #else
-__RCSID("$NetBSD: newfs_msdos.c,v 1.7 2001/09/10 18:27:42 christos Exp $");
+__RCSID("$NetBSD: newfs_msdos.c,v 1.8 2001/09/10 19:25:35 pooka Exp $");
 #endif
 #endif /* not lint */
 
@@ -353,7 +353,7 @@
        usage();
     fname = *argv++;
     if (!strchr(fname, '/')) {
-       snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
+       snprintf(buf, sizeof(buf), "%sr%s", _PATH_DEV, fname);
        if (!(fname = strdup(buf)))
            err(1, NULL);
     }
@@ -770,9 +770,9 @@
 #endif
        part = *s2++ - 'a';
     }
+#ifdef __FreeBSD__
     if (!s2 || (*s2 && *s2 != '.'))
        errx(1, "%s: can't figure out partition info", fname);
-#ifdef __FreeBSD__
     if (slice != -1 && (!oflag || (!bpb->bsec && part == -1))) {
        if (ioctl(fd, DIOCGSLICEINFO, &ds) == -1) {
            warn("ioctl (GSLICEINFO)");



Home | Main Index | Thread Index | Old Index