to read.
No functional change.
-/* $OpenBSD: cmd.h,v 1.20 2021/06/14 17:34:06 krw Exp $ */
+/* $OpenBSD: cmd.h,v 1.21 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define CMD_DIRTY 0x0004
struct cmd {
- char *cmd;
- int gpt;
- int (*fcn)(char *, struct mbr *);
- char *help;
+ char *cmd;
+ int gpt;
+ int (*fcn)(char *, struct mbr *);
+ char *help;
};
-extern struct cmd cmd_table[];
+extern struct cmd cmd_table[];
-int Xreinit(char *, struct mbr *);
-int Xdisk(char *, struct mbr *);
-int Xmanual(char *, struct mbr *);
-int Xedit(char *, struct mbr *);
-int Xsetpid(char *, struct mbr *);
-int Xselect(char *, struct mbr *);
-int Xswap(char *, struct mbr *);
-int Xprint(char *, struct mbr *);
-int Xwrite(char *, struct mbr *);
-int Xexit(char *, struct mbr *);
-int Xquit(char *, struct mbr *);
-int Xabort(char *, struct mbr *);
-int Xhelp(char *, struct mbr *);
-int Xflag(char *, struct mbr *);
-int Xupdate(char *, struct mbr *);
+int Xreinit(char *, struct mbr *);
+int Xdisk(char *, struct mbr *);
+int Xmanual(char *, struct mbr *);
+int Xedit(char *, struct mbr *);
+int Xsetpid(char *, struct mbr *);
+int Xselect(char *, struct mbr *);
+int Xswap(char *, struct mbr *);
+int Xprint(char *, struct mbr *);
+int Xwrite(char *, struct mbr *);
+int Xexit(char *, struct mbr *);
+int Xquit(char *, struct mbr *);
+int Xabort(char *, struct mbr *);
+int Xhelp(char *, struct mbr *);
+int Xflag(char *, struct mbr *);
+int Xupdate(char *, struct mbr *);
#endif /* _CMD_H */
-/* $OpenBSD: disk.h,v 1.23 2021/06/25 19:24:53 krw Exp $ */
+/* $OpenBSD: disk.h,v 1.24 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define _DISK_H
struct disk {
- char *name;
- int fd;
- uint32_t cylinders;
- uint32_t heads;
- uint32_t sectors;
- uint32_t size;
+ char *name;
+ int fd;
+ uint32_t cylinders;
+ uint32_t heads;
+ uint32_t sectors;
+ uint32_t size;
};
/* Align partition starts/sizes on 32K-byte boundaries. */
#define BLOCKALIGNMENT 64
-void DISK_open(int);
-int DISK_printgeometry(char *);
-char *DISK_readsector(off_t);
-int DISK_writesector(char *, off_t);
+void DISK_open(int);
+int DISK_printgeometry(char *);
+char *DISK_readsector(off_t);
+int DISK_writesector(char *, off_t);
-extern struct disk disk;
-extern struct disklabel dl;
+extern struct disk disk;
+extern struct disklabel dl;
#endif /* _DISK_H */
-/* $OpenBSD: gpt.h,v 1.13 2021/06/28 19:50:30 krw Exp $ */
+/* $OpenBSD: gpt.h,v 1.14 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 2015 Markus Muller <mmu@grummel.net>
* Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org>
void GPT_print_part(int, char *, int);
void GPT_print_parthdr(int);
-extern struct gpt_header gh;
-extern struct gpt_partition gp[NGPTPARTITIONS];
+extern struct gpt_header gh;
+extern struct gpt_partition gp[NGPTPARTITIONS];
#define ANYGPT 0
#define PRIMARYGPT 1
-/* $OpenBSD: mbr.h,v 1.31 2021/06/16 15:40:47 krw Exp $ */
+/* $OpenBSD: mbr.h,v 1.32 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define _MBR_H
struct mbr {
- off_t reloffset;
- off_t offset;
- unsigned char code[DOSPARTOFF];
- struct prt part[NDOSPART];
- uint16_t signature;
+ off_t reloffset;
+ off_t offset;
+ unsigned char code[DOSPARTOFF];
+ struct prt part[NDOSPART];
+ uint16_t signature;
};
-extern struct mbr initial_mbr;
+extern struct mbr initial_mbr;
-void MBR_print(struct mbr *, char *);
-void MBR_parse(struct dos_mbr *, off_t, off_t, struct mbr *);
-void MBR_make(struct mbr *, struct dos_mbr *);
-void MBR_init(struct mbr *);
-void MBR_init_GPT(struct mbr *);
-int MBR_read(off_t, struct dos_mbr *);
-int MBR_write(off_t, struct dos_mbr *);
-int MBR_protective_mbr(struct mbr *);
+void MBR_print(struct mbr *, char *);
+void MBR_parse(struct dos_mbr *, off_t, off_t, struct mbr *);
+void MBR_make(struct mbr *, struct dos_mbr *);
+void MBR_init(struct mbr *);
+void MBR_init_GPT(struct mbr *);
+int MBR_read(off_t, struct dos_mbr *);
+int MBR_write(off_t, struct dos_mbr *);
+int MBR_protective_mbr(struct mbr *);
#endif /* _MBR_H */
-/* $OpenBSD: misc.h,v 1.36 2021/06/20 18:44:19 krw Exp $ */
+/* $OpenBSD: misc.h,v 1.37 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define _MISC_H
struct unit_type {
- char *abbr;
- int64_t conversion;
- char *lname;
+ char *abbr;
+ int64_t conversion;
+ char *lname;
};
-extern struct unit_type unit_types[];
-#define SECTORS 1 /* units are bytes/sectors/kbytes/mbytes/gbytes */
+extern struct unit_type unit_types[];
+#define SECTORS 1
/* Prototypes */
-int unit_lookup(char *);
-int string_from_line(char *, size_t);
-void ask_cmd(char **, char **);
-int ask_num(const char *, int, int, int);
-int ask_pid(int, struct uuid *);
-char *ask_string(const char *, const char *);
-int ask_yn(const char *);
-uint64_t getuint64(char *, uint64_t, uint64_t, uint64_t);
-uint32_t crc32(const u_char *, const uint32_t);
-char *utf16le_to_string(const uint16_t *);
-uint16_t *string_to_utf16le(const char *);
-void parse_b(const char *, uint32_t *, uint32_t *, uint8_t *);
+int unit_lookup(char *);
+int string_from_line(char *, size_t);
+void ask_cmd(char **, char **);
+int ask_num(const char *, int, int, int);
+int ask_pid(int, struct uuid *);
+char *ask_string(const char *, const char *);
+int ask_yn(const char *);
+uint64_t getuint64(char *, uint64_t, uint64_t, uint64_t);
+uint32_t crc32(const u_char *, const uint32_t);
+char *utf16le_to_string(const uint16_t *);
+uint16_t *string_to_utf16le(const char *);
+void parse_b(const char *, uint32_t *, uint32_t *, uint8_t *);
-#endif /* _MISC_H */
+#endif /* _MISC_H */
-/* $OpenBSD: part.h,v 1.24 2021/06/21 02:05:30 krw Exp $ */
+/* $OpenBSD: part.h,v 1.25 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define _PART_H
struct prt {
- uint64_t bs;
- uint64_t ns;
- uint32_t shead, scyl, ssect;
- uint32_t ehead, ecyl, esect;
- unsigned char flag;
- unsigned char id;
+ uint64_t bs;
+ uint64_t ns;
+ uint32_t shead, scyl, ssect;
+ uint32_t ehead, ecyl, esect;
+ unsigned char flag;
+ unsigned char id;
};
-void PRT_printall(void);
-void PRT_parse(struct dos_partition *, off_t, off_t,
+void PRT_printall(void);
+void PRT_parse(struct dos_partition *, off_t, off_t,
struct prt *);
-void PRT_make(struct prt *, off_t, off_t, struct dos_partition *);
-void PRT_print(int, struct prt *, char *);
-char *PRT_uuid_to_typename(struct uuid *);
-int PRT_uuid_to_type(struct uuid *);
-struct uuid *PRT_type_to_uuid(int);
-int PRT_protected_guid(struct uuid *);
+void PRT_make(struct prt *, off_t, off_t, struct dos_partition *);
+void PRT_print(int, struct prt *, char *);
+char *PRT_uuid_to_typename(struct uuid *);
+int PRT_uuid_to_type(struct uuid *);
+struct uuid *PRT_type_to_uuid(int);
+int PRT_protected_guid(struct uuid *);
/* This does CHS -> bs/ns */
void PRT_fix_BN(struct prt *, int);
-/* $OpenBSD: user.h,v 1.17 2015/12/11 21:57:31 krw Exp $ */
+/* $OpenBSD: user.h,v 1.18 2021/07/11 13:23:18 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
#define _USER_H
/* Prototypes */
-void USER_edit(off_t, off_t);
-void USER_print_disk(int);
+void USER_edit(off_t, off_t);
+void USER_print_disk(int);
#endif /* _USER_H */