Source-Changes-HG archive

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

[src/trunk]: src/sbin/disklabel Make BSDLFS a EXT2FS-like filesystem, that is...



details:   https://anonhg.NetBSD.org/src/rev/ae9f1f80d8d5
branches:  trunk
changeset: 473451:ae9f1f80d8d5
user:      is <is%NetBSD.org@localhost>
date:      Fri Jun 04 19:02:34 1999 +0000

description:
Make BSDLFS a EXT2FS-like filesystem, that is, dont print or parse the cpg
field.
According to disklabel.h, its LFS semantics are "segment shift" (log2(segment
size)), but in the code it is used nowhere, and there are even plans to
allow non-poweroftwo segment sizes, so it won't ever work.
While at this, simplify the disktab-like output routine... here, currently,
BSDFFS, BSDLFS, EX2FS and ADOS do the same, so don't duplicate the code.

diffstat:

 sbin/disklabel/disklabel.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (67 lines):

diff -r d1d72718422a -r ae9f1f80d8d5 sbin/disklabel/disklabel.c
--- a/sbin/disklabel/disklabel.c        Fri Jun 04 18:59:15 1999 +0000
+++ b/sbin/disklabel/disklabel.c        Fri Jun 04 19:02:34 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disklabel.c,v 1.72 1999/06/03 21:15:49 is Exp $        */
+/*     $NetBSD: disklabel.c,v 1.73 1999/06/04 19:02:34 is Exp $        */
 
 /*
  * Copyright (c) 1987, 1993
@@ -47,7 +47,7 @@
 static char sccsid[] = "@(#)disklabel.c        8.4 (Berkeley) 5/4/95";
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #else
-__RCSID("$NetBSD: disklabel.c,v 1.72 1999/06/03 21:15:49 is Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.73 1999/06/04 19:02:34 is Exp $");
 #endif
 #endif /* not lint */
 
@@ -1098,16 +1098,12 @@
 
                        case FS_BSDFFS:
                        case FS_BSDLFS:
+                       case FS_EX2FS:
                        case FS_ADOS:
                                (void) fprintf(f, "b%c#%d:", c,
                                    pp->p_fsize * pp->p_frag);
                                (void) fprintf(f, "f%c#%d:", c, pp->p_fsize);
                                break;
-                       case FS_EX2FS:
-                               (void) fprintf(f, "b%c#%d:", c,
-                                       pp->p_fsize * pp->p_frag);
-                               (void) fprintf(f, "f%c#%d:", c, pp->p_fsize);
-                               break;
                        default:
                                break;
                        }
@@ -1212,13 +1208,13 @@
                                break;
 
                        case FS_BSDFFS:
-                       case FS_BSDLFS:
                        case FS_ADOS:
                                (void) fprintf(f, "    %5d %5d %5d ",
                                    pp->p_fsize, pp->p_fsize * pp->p_frag,
                                    pp->p_cpg);
                                break;
 
+                       case FS_BSDLFS:
                        case FS_EX2FS:
                                (void) fprintf(f, "    %5d %5d       ",
                                    pp->p_fsize, pp->p_fsize * pp->p_frag);
@@ -1672,7 +1668,6 @@
                                break;
 
                        case FS_BSDFFS:
-                       case FS_BSDLFS:
                        case FS_ADOS:
                                NXTNUM(pp->p_fsize);
                                if (pp->p_fsize == 0)
@@ -1681,6 +1676,7 @@
                                pp->p_frag = v / pp->p_fsize;
                                NXTNUM(pp->p_cpg);
                                break;
+                       case FS_BSDLFS:
                        case FS_EX2FS:
                                NXTNUM(pp->p_fsize);
                                if (pp->p_fsize == 0)



Home | Main Index | Thread Index | Old Index