disklable.c

2009-05-13 07:14:08来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


                                                                #ifndef BBSIZE
#define    BBSIZE    8192            /* size of boot area, with label */
#endif
#ifndef NUMBOOT
#define NUMBOOT 0
#endif
char    *dkname, *specname;
char    tmpfil[] = _PATH_TMPFILE;
char    namebuf[BBSIZE], *np = namebuf;
struct    disklabel lab;
char    bootarea[BBSIZE];
#if NUMBOOT > 0
int    installboot;    /* non-zero if we should install a boot program */
char    *bootbuf;    /* pointer to buffer with remainder of boot prog */
int    bootsize;    /* size of remaining boot program */
char    *xxboot;    /* primary boot */
char    *bootxx;    /* secondary boot */
char    boot0[MAXPATHLEN];
#if NUMBOOT > 1
char    boot1[MAXPATHLEN];
#endif
#endif
enum {
    UNSPEC, EDIT, EDITOR, READ, RESTORE, SETWRITEABLE, WRITE, WRITEBOOT
} op = UNSPEC;
int    cflag;
int    dflag;
int    rflag;
int    tflag;
int    nwflag;
int    verbose;
int    donothing;
#ifdef DOSLABEL
struct dos_partition *dosdp;    /* DOS partition, if found */
struct dos_partition *readmbr(int);
#endif
void    makedisktab(FILE *, struct disklabel *);
void    makelabel(char *, char *, struct disklabel *);
int    writelabel(int, char *, struct disklabel *);
void    l_perror(char *);
int    edit(struct disklabel *, int);
int    editit(void);
char    *skip(char *);
char    *word(char *);
int    getasciilabel(FILE *, struct disklabel *);
int    cmplabel(struct disklabel *, struct disklabel *);
void    setbootflag(struct disklabel *);
void    usage(void);
u_int32_t getnum(char *, u_int32_t, u_int32_t, const char **);
               
                int
main(int argc, char *argv[])
{
    int ch, f, writeable, error = 0;
    char *fstabfile = NULL;
    struct disklabel *lp;
    char print_unit = 0;
    FILE *t;
    while ((ch = getopt(argc, argv, "BEf:NRWb:cdenp:rs:tvw")) != -1)
        switch (ch) {
#if NUMBOOT > 0
        case 'B': /* 安装引导记录的标志 */

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:使用FreeBSD自带的ftpd程序搭建ftp服务器

下一篇:freebsd下安装JDK