Fix depenency on common symbols in sbin.

This commit is contained in:
joerg 2020-04-05 15:25:39 +00:00
parent 17a313ddde
commit 6ce4f404a1
14 changed files with 368 additions and 166 deletions

View File

@ -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) */

View File

@ -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 @@ struct ufsi {
((((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 @@ char *dumpinomap; /* map of files to be dumped */
/*
* 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 blockswritten; /* number of blocks written on current tape */
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 */

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\
#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 @@ __RCSID("$NetBSD: main.c,v 1.76 2019/08/19 18:12:50 perseant Exp $");
#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 */

View File

@ -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 @@ struct bufarea {
#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 {
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 {
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 @@ struct inoinfo {
/* 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 */
extern daddr_t n_files; /* number of files in use */
#define clearinode(dp) (*(dp) = zino)
struct ext2fs_dinode zino;
extern struct ext2fs_dinode zino;
#define setbmap(blkno) setbit(blockmap, blkno)
#define testbmap(blkno) isset(blockmap, blkno)

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.40 2019/08/15 03:10:42 kamil Exp $ */
/* $NetBSD: main.c,v 1.41 2020/04/05 15:25:39 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -63,7 +63,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94";
#else
__RCSID("$NetBSD: main.c,v 1.40 2019/08/15 03:10:42 kamil Exp $");
__RCSID("$NetBSD: main.c,v 1.41 2020/04/05 15:25:39 joerg Exp $");
#endif
#endif /* not lint */
@ -87,7 +87,43 @@ __RCSID("$NetBSD: main.c,v 1.40 2019/08/15 03:10:42 kamil Exp $");
#include "fsutil.h"
#include "exitvalues.h"
struct bufarea bufhead;
struct bufarea sblk;
struct bufarea asblk;
struct bufarea *pdirbp;
struct bufarea *pbp;
struct bufarea *getdatablk(daddr_t, long);
struct m_ext2fs sblock;
struct dups *duplist;
struct dups *muldup;
struct zlncnt *zlnhead;
struct inoinfo **inphead, **inpsort;
long numdirs, listmax, inplast;
long dev_bsize;
long secsize;
char nflag;
char yflag;
int bflag;
int Uflag;
int debug;
int preen;
char havesb;
char skipclean;
int fsmodified;
int fsreadfd;
int fswritefd;
int rerun;
daddr_t maxfsblock;
char *blockmap;
ino_t maxino;
ino_t lastino;
char *statemap;
u_char *typemap;
int16_t *lncntp;
ino_t lfdir;
daddr_t n_blks;
daddr_t n_files;
struct ext2fs_dinode zino;
static int argtoi(int, const char *, const char *, int);
static int checkfilesys(const char *, char *, long, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsck.h,v 1.53 2019/05/05 14:59:06 christos Exp $ */
/* $NetBSD: fsck.h,v 1.54 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -96,7 +96,7 @@ struct inostat {
* Inode state information is contained on per cylinder group lists
* which are described by the following structure.
*/
struct inostatlist {
extern struct inostatlist {
long il_numalloced; /* number of inodes allocated in this cg */
struct inostat *il_stat;/* inostat info for this cylinder group */
} *inostathead;
@ -140,15 +140,15 @@ struct bufarea {
#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; /* file system superblock */
struct bufarea cgblk; /* cylinder group blocks */
extern struct bufarea bufhead; /* head of list of other blks in filesys */
extern struct bufarea sblk; /* file system superblock */
extern struct bufarea asblk; /* file system superblock */
extern struct bufarea cgblk; /* cylinder group blocks */
#ifndef NO_APPLE_UFS
struct bufarea appleufsblk; /* Apple UFS volume label */
extern struct bufarea appleufsblk; /* Apple UFS volume label */
#endif
struct bufarea *pdirbp; /* current directory contents */
struct bufarea *pbp; /* current inode block */
extern struct bufarea *pdirbp; /* current directory contents */
extern struct bufarea *pbp; /* current inode block */
#define dirty(bp) (bp)->b_dirty = 1
#define initbarea(bp) \
@ -156,10 +156,10 @@ struct bufarea *pbp; /* current inode block */
(bp)->b_bno = (daddr_t)-1; \
(bp)->b_flags = 0;
struct fs *sblock;
struct fs *altsblock;
struct cg *cgrp;
struct fs *sblocksave;
extern struct fs *sblock;
extern struct fs *altsblock;
extern struct cg *cgrp;
extern struct fs *sblocksave;
#define sbdirty() \
do { \
memmove(sblk.b_un.b_fs, sblock, SBLOCKSIZE); \
@ -227,8 +227,8 @@ struct dups {
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.
@ -237,12 +237,12 @@ struct zlncnt {
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;
ino_t i_number; /* inode number of this entry */
@ -252,7 +252,7 @@ struct inoinfo {
u_int i_numblks; /* size of block array in bytes */
int64_t i_blks[1]; /* actually longer */
} **inphead, **inpsort;
long numdirs, dirhash, listmax, inplast;
extern long numdirs, dirhash, listmax, inplast;
/*
* quota usage structures
@ -264,43 +264,43 @@ struct uquot {
uint32_t uq_uid; /* uid/gid of the owner */
};
SLIST_HEAD(uquot_hash, uquot);
struct uquot_hash *uquot_user_hash;
struct uquot_hash *uquot_group_hash;
uint8_t q2h_hash_shift;
uint16_t q2h_hash_mask;
extern struct uquot_hash *uquot_user_hash;
extern struct uquot_hash *uquot_group_hash;
extern uint8_t q2h_hash_shift;
extern uint16_t q2h_hash_mask;
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 Uflag; /* resolve user names */
int bflag; /* location of alternate super block */
int debug; /* output debugging info */
int zflag; /* zero unused directory space */
int cvtlevel; /* convert to newer file system format */
int doinglevel1; /* converting to new cylinder group format */
int doinglevel2; /* converting to new inode format */
int newinofmt; /* filesystem has new inode format */
char usedsoftdep; /* just fix soft dependency inconsistencies */
int preen; /* just fix normal inconsistencies */
int quiet; /* Don't print anything if clean */
int forceimage; /* file system is an image file */
int is_ufs2; /* we're dealing with an UFS2 filesystem */
int markclean; /* mark file system clean when done */
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 */
char resolved; /* cleared if unresolved changes => not clean */
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 Uflag; /* resolve user names */
extern int bflag; /* location of alternate super block */
extern int debug; /* output debugging info */
extern int zflag; /* zero unused directory space */
extern int cvtlevel; /* convert to newer file system format */
extern int doinglevel1; /* converting to new cylinder group format */
extern int doinglevel2; /* converting to new inode format */
extern int newinofmt; /* filesystem has new inode format */
extern char usedsoftdep; /* just fix soft dependency inconsistencies */
extern int preen; /* just fix normal inconsistencies */
extern int quiet; /* Don't print anything if clean */
extern int forceimage; /* file system is an image file */
extern int is_ufs2; /* we're dealing with an UFS2 filesystem */
extern int markclean; /* mark file system clean when done */
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 */
extern char resolved; /* cleared if unresolved changes => not clean */
#ifndef NO_FFS_EI
int endian; /* endian coversion */
int doswap; /* convert byte order */
int needswap; /* need to convert byte order in memory */
int do_blkswap; /* need to do block addr byteswap */
int do_dirswap; /* need to do dir entry byteswap */
extern int endian; /* endian coversion */
extern int doswap; /* convert byte order */
extern int needswap; /* need to convert byte order in memory */
extern int do_blkswap; /* need to do block addr byteswap */
extern int do_dirswap; /* need to do dir entry byteswap */
#else
/* Disable Endian-Independent FFS support for install media */
#define endian (0)
@ -316,28 +316,28 @@ int do_dirswap; /* need to do dir entry byteswap */
#endif
#ifndef NO_APPLE_UFS
int isappleufs; /* filesystem is Apple UFS */
extern int isappleufs; /* filesystem is Apple UFS */
#else
/* Disable Apple UFS support for install media */
#define isappleufs (0)
#endif
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 */
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 */
int dirblksiz;
extern int dirblksiz;
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 */
ino_t n_files; /* number of files in use */
extern daddr_t n_blks; /* number of blocks in use */
extern ino_t n_files; /* number of files in use */
long countdirs;
extern long countdirs;
int got_siginfo; /* received a SIGINFO */
extern int got_siginfo; /* received a SIGINFO */
#define clearinode(dp) \
do { \
@ -347,8 +347,8 @@ do { \
(dp)->dp1 = ufs1_zino; \
} while (0)
struct ufs1_dinode ufs1_zino;
struct ufs2_dinode ufs2_zino;
extern struct ufs1_dinode ufs1_zino;
extern struct ufs2_dinode ufs2_zino;
#define setbmap(blkno) setbit(blockmap, blkno)
#define testbmap(blkno) isset(blockmap, blkno)

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.86 2019/08/15 03:10:42 kamil Exp $ */
/* $NetBSD: main.c,v 1.87 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
#else
__RCSID("$NetBSD: main.c,v 1.86 2019/08/15 03:10:42 kamil Exp $");
__RCSID("$NetBSD: main.c,v 1.87 2020/04/05 15:25:40 joerg Exp $");
#endif
#endif /* not lint */
@ -70,6 +70,68 @@ __RCSID("$NetBSD: main.c,v 1.86 2019/08/15 03:10:42 kamil Exp $");
#include "exitvalues.h"
#include "snapshot.h"
struct bufarea bufhead;
struct bufarea sblk;
struct bufarea asblk;
struct bufarea cgblk;
struct bufarea appleufsblk;
struct bufarea *pdirbp;
struct bufarea *pbp;
struct fs *sblock;
struct fs *altsblock;
struct cg *cgrp;
struct fs *sblocksave;
struct dups *duplist;
struct dups *muldup;
struct zlncnt *zlnhead;
struct inoinfo **inphead, **inpsort;
long numdirs, dirhash, listmax, inplast;
struct uquot_hash *uquot_user_hash;
struct uquot_hash *uquot_group_hash;
uint8_t q2h_hash_shift;
uint16_t q2h_hash_mask;
struct inostatlist *inostathead;
long dev_bsize;
long secsize;
char nflag;
char yflag;
int Uflag;
int bflag;
int debug;
int zflag;
int cvtlevel;
int doinglevel1;
int doinglevel2;
int newinofmt;
char usedsoftdep;
int preen;
int forceimage;
int is_ufs2;
int markclean;
char havesb;
char skipclean;
int fsmodified;
int fsreadfd;
int fswritefd;
int rerun;
char resolved;
int endian;
int doswap;
int needswap;
int do_blkswap;
int do_dirswap;
int isappleufs;
daddr_t maxfsblock;
char *blockmap;
ino_t maxino;
int dirblksiz;
daddr_t n_blks;
ino_t n_files;
long countdirs;
int got_siginfo;
struct ufs1_dinode ufs1_zino;
struct ufs2_dinode ufs2_zino;
int progress = 0;
static int argtoi(int, const char *, const char *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsdb.c,v 1.50 2017/08/04 07:19:35 mrg Exp $ */
/* $NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $ */
/*-
* Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: fsdb.c,v 1.50 2017/08/04 07:19:35 mrg Exp $");
__RCSID("$NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -61,6 +61,68 @@ __RCSID("$NetBSD: fsdb.c,v 1.50 2017/08/04 07:19:35 mrg Exp $");
#include "fsck.h"
#include "extern.h"
struct bufarea bufhead;
struct bufarea sblk;
struct bufarea asblk;
struct bufarea cgblk;
struct bufarea appleufsblk;
struct bufarea *pdirbp;
struct bufarea *pbp;
struct fs *sblock;
struct fs *altsblock;
struct cg *cgrp;
struct fs *sblocksave;
struct dups *duplist;
struct dups *muldup;
struct zlncnt *zlnhead;
struct inoinfo **inphead, **inpsort;
long numdirs, dirhash, listmax, inplast;
struct uquot_hash *uquot_user_hash;
struct uquot_hash *uquot_group_hash;
uint8_t q2h_hash_shift;
uint16_t q2h_hash_mask;
struct inostatlist *inostathead;
long dev_bsize;
long secsize;
char nflag;
char yflag;
int Uflag;
int bflag;
int debug;
int zflag;
int cvtlevel;
int doinglevel1;
int doinglevel2;
int newinofmt;
char usedsoftdep;
int preen;
int forceimage;
int is_ufs2;
int markclean;
char havesb;
char skipclean;
int fsmodified;
int fsreadfd;
int fswritefd;
int rerun;
char resolved;
int endian;
int doswap;
int needswap;
int do_blkswap;
int do_dirswap;
int isappleufs;
daddr_t maxfsblock;
char *blockmap;
ino_t maxino;
int dirblksiz;
daddr_t n_blks;
ino_t n_files;
long countdirs;
int got_siginfo;
struct ufs1_dinode ufs1_zino;
struct ufs2_dinode ufs2_zino;
/* Used to keep state for "saveblks" command. */
struct wrinfo {
off_t size;

View File

@ -1,4 +1,4 @@
/* $NetBSD: iscsid_globals.h,v 1.9 2016/05/30 22:02:41 joerg Exp $ */
/* $NetBSD: iscsid_globals.h,v 1.10 2020/04/05 15:25:40 joerg Exp $ */
/*-
* Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@ -362,19 +362,19 @@ typedef struct
/* In iscsid_main.c */
int driver; /* the driver's file desc */
int client_sock; /* the client communication socket */
extern int driver; /* the driver's file desc */
extern int client_sock; /* the client communication socket */
list_head_t list[NUM_DAEMON_LISTS]; /* the lists this daemon keeps */
extern list_head_t list[NUM_DAEMON_LISTS]; /* the lists this daemon keeps */
#ifndef ISCSI_NOTHREAD
pthread_t event_thread; /* event handler thread ID */
pthread_mutex_t sesslist_lock; /* session list lock */
extern pthread_t event_thread; /* event handler thread ID */
extern pthread_mutex_t sesslist_lock; /* session list lock */
#endif
/* in iscsid_discover.c */
iscsid_set_node_name_req_t node_name;
extern iscsid_set_node_name_req_t node_name;
/* ------------------------- Global Functions ----------------------------- */

View File

@ -1,4 +1,4 @@
/* $NetBSD: newfs_udf.c,v 1.19 2016/03/09 19:48:24 christos Exp $ */
/* $NetBSD: newfs_udf.c,v 1.20 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@ -72,7 +72,6 @@
int newfs_udf(int argc, char **argv);
static void usage(void) __attribute__((__noreturn__));
/* queue for temporary storage of sectors to be written out */
struct wrsect {
uint64_t sectornr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: newfs_udf.h,v 1.6 2019/06/30 11:38:16 sevan Exp $ */
/* $NetBSD: newfs_udf.h,v 1.7 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@ -55,8 +55,8 @@ extern float meta_fract;
/* shared structure between udf_create.c users */
struct udf_create_context context;
struct udf_disclayout layout;
extern struct udf_create_context context;
extern struct udf_disclayout layout;
/* prototypes */
int udf_write_sector(void *sector, uint64_t location);

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_create.c,v 1.26 2018/12/09 17:52:48 christos Exp $ */
/* $NetBSD: udf_create.c,v 1.27 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: udf_create.c,v 1.26 2018/12/09 17:52:48 christos Exp $");
__RCSID("$NetBSD: udf_create.c,v 1.27 2020/04/05 15:25:40 joerg Exp $");
#include <stdio.h>
#include <stdlib.h>
@ -52,6 +52,9 @@ __RCSID("$NetBSD: udf_create.c,v 1.26 2018/12/09 17:52:48 christos Exp $");
# endif
#endif
struct udf_create_context context;
struct udf_disclayout layout;
/*
* NOTE that there is some overlap between this code and the udf kernel fs.
* This is intentially though it might better be factored out one day.

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.35 2013/01/22 09:39:13 dholland Exp $ */
/* $NetBSD: main.c,v 1.36 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: main.c,v 1.35 2013/01/22 09:39:13 dholland Exp $");
__RCSID("$NetBSD: main.c,v 1.36 2020/04/05 15:25:40 joerg Exp $");
#endif
#endif /* not lint */
@ -62,6 +62,9 @@ __RCSID("$NetBSD: main.c,v 1.35 2013/01/22 09:39:13 dholland Exp $");
#include "restore.h"
#include "extern.h"
struct context curfile;
union u_spcl u_spcl;
int uflag;
int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
int hflag = 1, mflag = 1, Dflag = 0, Nflag = 0;
char command = '\0';

View File

@ -1,4 +1,4 @@
/* $NetBSD: restore.h,v 1.21 2019/12/27 07:41:23 msaitoh Exp $ */
/* $NetBSD: restore.h,v 1.22 2020/04/05 15:25:40 joerg Exp $ */
/*
* Copyright (c) 1983, 1993
@ -120,7 +120,7 @@ struct entry {
/*
* The entry describes the next file available on the tape
*/
struct context {
extern struct context {
short action; /* action being taken on this file */
mode_t mode; /* mode of file */
ino_t ino; /* inumber of file */