disklable.c
2009-05-13 07:14:08来源:未知 阅读 ()
#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
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- DragonFly BSD 2.2.1发布 2009-05-13
- NetBSD笔记 2009-05-13
- Electric shanghai massage adevice is difficult to 2009-05-13
- vbox联网搞定 2009-05-13
- Freebsd上使用pf防火墙 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash