Source-Changes-HG archive

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

[src/trunk]: src Fix depenency on common symbols in sbin.



details:   https://anonhg.NetBSD.org/src/rev/12767afc2c66
branches:  trunk
changeset: 850497:12767afc2c66
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Apr 05 15:25:39 2020 +0000

description:
Fix depenency on common symbols in sbin.

diffstat:

 include/protocols/dumprestore.h |    4 +-
 sbin/dump/dump.h                |   72 +++++++++++-----------
 sbin/dump/main.c                |   41 ++++++++++++-
 sbin/fsck_ext2fs/fsck.h         |   76 ++++++++++++------------
 sbin/fsck_ext2fs/main.c         |   42 ++++++++++++-
 sbin/fsck_ffs/fsck.h            |  126 ++++++++++++++++++++--------------------
 sbin/fsck_ffs/main.c            |   66 ++++++++++++++++++++-
 sbin/fsdb/fsdb.c                |   66 ++++++++++++++++++++-
 sbin/iscsid/iscsid_globals.h    |   14 ++--
 sbin/newfs_udf/newfs_udf.c      |    3 +-
 sbin/newfs_udf/newfs_udf.h      |    6 +-
 sbin/newfs_udf/udf_create.c     |    7 +-
 sbin/restore/main.c             |    7 +-
 sbin/restore/restore.h          |    4 +-
 14 files changed, 368 insertions(+), 166 deletions(-)

diffs (truncated from 909 to 300 lines):

diff -r a36719240533 -r 12767afc2c66 include/protocols/dumprestore.h
--- a/include/protocols/dumprestore.h   Sun Apr 05 15:16:11 2020 +0000
+++ b/include/protocols/dumprestore.h   Sun Apr 05 15:25:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dumprestore.h,v 1.18 2016/01/22 23:11:50 dholland Exp $        */
+/*     $NetBSD: dumprestore.h,v 1.19 2020/04/05 15:25:39 joerg Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -68,7 +68,7 @@
 #endif
 #define CHECKSUM       (int)84446
 
-union u_spcl {
+extern union u_spcl {
        char dummy[TP_BSIZE];
        struct  s_spcl {
                int32_t c_type;             /* record type (see below) */
diff -r a36719240533 -r 12767afc2c66 sbin/dump/dump.h
--- a/sbin/dump/dump.h  Sun Apr 05 15:16:11 2020 +0000
+++ b/sbin/dump/dump.h  Sun Apr 05 15:25:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dump.h,v 1.57 2019/03/25 02:13:01 manu Exp $   */
+/*     $NetBSD: dump.h,v 1.58 2020/04/05 15:25:39 joerg Exp $  */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -85,15 +85,15 @@
        ((((b) >= UFS_NDADDR || DIP((d), size) >= ((b)+1) << (u)->ufs_bshift \
                ? (u)->ufs_bsize \
                : (ufs_fragroundup((u), ufs_blkoff(u, DIP((d), size)))))))
-struct ufsi *ufsib;
+extern struct ufsi *ufsib;
 
 /*
  * Dump maps used to describe what is to be dumped.
  */
-int    mapsize;        /* size of the state maps */
-char   *usedinomap;    /* map of allocated inodes */
-char   *dumpdirmap;    /* map of directories to be dumped */
-char   *dumpinomap;    /* map of files to be dumped */
+extern int     mapsize;        /* size of the state maps */
+extern char    *usedinomap;    /* map of allocated inodes */
+extern char    *dumpdirmap;    /* map of directories to be dumped */
+extern char    *dumpinomap;    /* map of files to be dumped */
 /*
  * Map manipulation macros.
  */
@@ -107,29 +107,29 @@
 /*
  *     All calculations done in 0.1" units!
  */
-char   *disk;          /* name of the disk file */
-char   *disk_dev;      /* name of the raw device we are dumping */
-const char *tape;      /* name of the tape file */
-const char *dumpdates; /* name of the file containing dump date information*/
-const char *temp;      /* name of the file for doing rewrite of dumpdates */
-char   lastlevel;      /* dump level of previous dump */
-char   level;          /* dump level of this dump */
-int    uflag;          /* update flag */
-const char *dumpdev;   /* device name in dumpdates */
-int    eflag;          /* eject flag */
-int    lflag;          /* autoload flag */
-int    diskfd;         /* disk file descriptor */
-int    tapefd;         /* tape file descriptor */
-int    pipeout;        /* true => output to standard output */
-int    trueinc;        /* true => "true incremental", i.e use last 9 as ref */
-ino_t  curino;         /* current inumber; used globally */
-int    newtape;        /* new tape flag */
-u_int64_t      tapesize;       /* estimated tape size, blocks */
-long   tsize;          /* tape size in 0.1" units */
-long   asize;          /* number of 0.1" units written on current tape */
-int    etapes;         /* estimated number of tapes */
-int    nonodump;       /* if set, do not honor UF_NODUMP user flags */
-int    unlimited;      /* if set, write to end of medium */
+extern char    *disk;          /* name of the disk file */
+extern char    *disk_dev;      /* name of the raw device we are dumping */
+extern const char *tape;       /* name of the tape file */
+extern const char *dumpdates;  /* name of the file containing dump date information*/
+extern const char *temp;       /* name of the file for doing rewrite of dumpdates */
+extern char    lastlevel;      /* dump level of previous dump */
+extern char    level;          /* dump level of this dump */
+extern int     uflag;          /* update flag */
+extern const char *dumpdev;    /* device name in dumpdates */
+extern int     eflag;          /* eject flag */
+extern int     lflag;          /* autoload flag */
+extern int     diskfd;         /* disk file descriptor */
+extern int     tapefd;         /* tape file descriptor */
+extern int     pipeout;        /* true => output to standard output */
+extern int     trueinc;        /* true => "true incremental", i.e use last 9 as ref */
+extern ino_t   curino;         /* current inumber; used globally */
+extern int     newtape;        /* new tape flag */
+extern u_int64_t       tapesize;       /* estimated tape size, blocks */
+extern long    tsize;          /* tape size in 0.1" units */
+extern long    asize;          /* number of 0.1" units written on current tape */
+extern int     etapes;         /* estimated number of tapes */
+extern int     nonodump;       /* if set, do not honor UF_NODUMP user flags */
+extern int     unlimited;      /* if set, write to end of medium */
 
 extern int     density;        /* density in 0.1" units */
 extern int     notify;         /* notify operator flag */
@@ -138,14 +138,14 @@
 extern int     tapeno;         /* current tape number */
 extern int     is_ufs2;
 
-time_t tstart_writing; /* when started writing the first tape block */
-time_t tstart_volume;  /* when started writing the current volume */
-int    xferrate;       /* averaged transfer rate of all volumes */
-char   sblock_buf[MAXBSIZE]; /* buffer to hold the superblock */
+extern time_t  tstart_writing; /* when started writing the first tape block */
+extern time_t  tstart_volume;  /* when started writing the current volume */
+extern int     xferrate;       /* averaged transfer rate of all volumes */
+extern char    sblock_buf[MAXBSIZE]; /* buffer to hold the superblock */
 extern long    dev_bsize;      /* block size of underlying disk device */
-int    dev_bshift;     /* log2(dev_bsize) */
-int    tp_bshift;      /* log2(TP_BSIZE) */
-int needswap;  /* file system in swapped byte order */
+extern int     dev_bshift;     /* log2(dev_bsize) */
+extern int     tp_bshift;      /* log2(TP_BSIZE) */
+extern int needswap;   /* file system in swapped byte order */
 
 
 /* some inline functions to help the byte-swapping mess */
diff -r a36719240533 -r 12767afc2c66 sbin/dump/main.c
--- a/sbin/dump/main.c  Sun Apr 05 15:16:11 2020 +0000
+++ b/sbin/dump/main.c  Sun Apr 05 15:25:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.76 2019/08/19 18:12:50 perseant Exp $       */
+/*     $NetBSD: main.c,v 1.77 2020/04/05 15:25:39 joerg Exp $  */
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.76 2019/08/19 18:12:50 perseant Exp $");
+__RCSID("$NetBSD: main.c,v 1.77 2020/04/05 15:25:39 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -69,6 +69,43 @@
 #include "pathnames.h"
 #include "snapshot.h"
 
+union u_spcl u_spcl;
+struct ufsi *ufsib;
+int    mapsize;
+char   *usedinomap;
+char   *dumpdirmap;
+char   *dumpinomap;
+char   *disk;
+char   *disk_dev;
+const char *tape;
+const char *dumpdates;
+const char *temp;
+char   lastlevel;
+char   level;
+int    uflag;
+const char *dumpdev;
+int    eflag;
+int    lflag;
+int    diskfd;
+int    tapefd;
+int    pipeout;
+int    trueinc;
+ino_t  curino;
+int    newtape;
+u_int64_t      tapesize;
+long   tsize;
+long   asize;
+int    etapes;
+int    nonodump;
+int    unlimited;
+time_t tstart_writing;
+time_t tstart_volume;
+int    xferrate;
+char   sblock_buf[MAXBSIZE];
+int    dev_bshift;
+int    tp_bshift;
+int needswap;
+
 int    timestamp;              /* print message timestamps */
 int    notify;                 /* notify operator flag */
 int    blockswritten;          /* number of blocks written on current tape */
diff -r a36719240533 -r 12767afc2c66 sbin/fsck_ext2fs/fsck.h
--- a/sbin/fsck_ext2fs/fsck.h   Sun Apr 05 15:16:11 2020 +0000
+++ b/sbin/fsck_ext2fs/fsck.h   Sun Apr 05 15:25:39 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fsck.h,v 1.16 2016/08/15 18:42:15 jdolecek Exp $       */
+/*     $NetBSD: fsck.h,v 1.17 2020/04/05 15:25:39 joerg Exp $  */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -97,13 +97,13 @@
 #define        B_INUSE 1
 
 #define        MINBUFS         5       /* minimum number of buffers required */
-struct bufarea bufhead;                /* head of list of other blks in filesys */
-struct bufarea sblk;           /* file system superblock */
-struct bufarea asblk;          /* first alternate superblock */
-struct bufarea *pdirbp;                /* current directory contents */
-struct bufarea *pbp;           /* current inode block */
-struct bufarea *getdatablk(daddr_t, long);
-struct m_ext2fs sblock;
+extern struct bufarea bufhead;         /* head of list of other blks in filesys */
+extern struct bufarea sblk;            /* file system superblock */
+extern struct bufarea asblk;           /* first alternate superblock */
+extern struct bufarea *pdirbp;         /* current directory contents */
+extern struct bufarea *pbp;            /* current inode block */
+extern struct bufarea *getdatablk(daddr_t, long);
+extern struct m_ext2fs sblock;
 
 #define        dirty(bp)       (bp)->b_dirty = 1
 #define        initbarea(bp) \
@@ -159,8 +159,8 @@
        struct dups *next;
        daddr_t dup;
 };
-struct dups *duplist;          /* head of dup list */
-struct dups *muldup;           /* end of unique duplicate dup block numbers */
+extern struct dups *duplist;   /* head of dup list */
+extern struct dups *muldup;    /* end of unique duplicate dup block numbers */
 
 /*
  * Linked list of inodes with zero link counts.
@@ -169,12 +169,12 @@
        struct zlncnt *next;
        ino_t zlncnt;
 };
-struct zlncnt *zlnhead;                /* head of zero link count list */
+extern struct zlncnt *zlnhead; /* head of zero link count list */
 
 /*
  * Inode cache data structures.
  */
-struct inoinfo {
+extern struct inoinfo {
        struct  inoinfo *i_nexthash;    /* next entry in hash chain */
        struct  inoinfo *i_child, *i_sibling, *i_parentp;
        ino_t   i_number;               /* inode number of this entry */
@@ -185,40 +185,40 @@
        /* XXX ondisk32 */
        int32_t i_blks[1];              /* actually longer */
 } **inphead, **inpsort;
-long numdirs, listmax, inplast;
+extern long numdirs, listmax, inplast;
 
-long   dev_bsize;              /* computed value of DEV_BSIZE */
-long   secsize;                /* actual disk sector size */
-char   nflag;                  /* assume a no response */
-char   yflag;                  /* assume a yes response */
-int    bflag;                  /* location of alternate super block */
-int    Uflag;                  /* resolve user names */
-int    debug;                  /* output debugging info */
-int    preen;                  /* just fix normal inconsistencies */
-char   havesb;                 /* superblock has been read */
-char   skipclean;              /* skip clean file systems if preening */
-int    fsmodified;             /* 1 => write done to file system */
-int    fsreadfd;               /* file descriptor for reading file system */
-int    fswritefd;              /* file descriptor for writing file system */
-int    rerun;                  /* rerun fsck.  Only used in non-preen mode */
+extern long    dev_bsize;      /* computed value of DEV_BSIZE */
+extern long    secsize;        /* actual disk sector size */
+extern char    nflag;          /* assume a no response */
+extern char    yflag;          /* assume a yes response */
+extern int     bflag;          /* location of alternate super block */
+extern int     Uflag;          /* resolve user names */
+extern int     debug;          /* output debugging info */
+extern int     preen;          /* just fix normal inconsistencies */
+extern char    havesb;         /* superblock has been read */
+extern char    skipclean;      /* skip clean file systems if preening */
+extern int     fsmodified;     /* 1 => write done to file system */
+extern int     fsreadfd;       /* file descriptor for reading file system */
+extern int     fswritefd;      /* file descriptor for writing file system */
+extern int     rerun;          /* rerun fsck.  Only used in non-preen mode */
 
-daddr_t        maxfsblock;             /* number of blocks in the file system */
-char   *blockmap;              /* ptr to primary blk allocation map */
-ino_t  maxino;                 /* number of inodes in file system */
-ino_t  lastino;                /* last inode in use */
-char   *statemap;              /* ptr to inode state table */
-u_char *typemap;               /* ptr to inode type table */
-int16_t        *lncntp;                /* ptr to link count table */
+extern daddr_t maxfsblock;     /* number of blocks in the file system */
+extern char    *blockmap;      /* ptr to primary blk allocation map */
+extern ino_t   maxino;         /* number of inodes in file system */
+extern ino_t   lastino;        /* last inode in use */
+extern char    *statemap;      /* ptr to inode state table */
+extern u_char  *typemap;       /* ptr to inode type table */
+extern int16_t *lncntp;        /* ptr to link count table */
 
-ino_t  lfdir;                  /* lost & found directory inode number */
+extern ino_t   lfdir;          /* lost & found directory inode number */
 extern const char *lfname;     /* lost & found directory name */
 extern int     lfmode;         /* lost & found directory creation mode */
 
-daddr_t        n_blks;                 /* number of blocks in use */
-daddr_t        n_files;                /* number of files in use */
+extern daddr_t n_blks;         /* number of blocks in use */



Home | Main Index | Thread Index | Old Index