--- Net2/sys/disklabel.h 2018/04/24 18:10:43 1.1.1.2 +++ Net2/sys/disklabel.h 2018/04/24 18:16:59 1.1.1.3 @@ -30,12 +30,17 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)disklabel.h 7.19 (Berkeley) 5/7/91 + * from: @(#)disklabel.h 7.19 (Berkeley) 5/7/91 + * disklabel.h,v 1.5 1993/05/22 09:00:32 deraadt Exp */ +#ifndef _SYS_DISKLABEL_H_ +#define _SYS_DISKLABEL_H_ + /* * Disk description table, see disktab(5) */ + #define _PATH_DISKTAB "/etc/disktab" #define DISKTAB "/etc/disktab" /* deprecated */ @@ -289,6 +294,7 @@ struct partinfo { struct partition *part; }; +#ifdef i386 /* DOS partition table -- located in boot block */ #define DOSBBSECTOR 0 /* DOS boot block relative sector number */ @@ -309,6 +315,19 @@ struct dos_partition { unsigned long dp_size; /* partition size in sectors */ } dos_partitions[NDOSPART]; +#include +struct cpu_disklabel { + struct dos_partition dosparts[NDOSPART]; + struct dkbad bad; +}; + +#endif /* i386 */ + +#if defined(hp300) || defined(mac) || defined(vax) +struct cpu_disklabel { +}; +#endif + #define DPSECT(s) ((s) & 0x3f) /* isolate relevant bits of sector */ #define DPCYL(c, s) ((c) + (((s) & 0xc0)<<2)) /* and those that are cylinder */ @@ -333,23 +352,29 @@ struct dos_partition { #if defined(KERNEL) +#ifdef i386 +int bounds_check_with_label __P((struct buf *, struct disklabel *, int)); +#endif -void diskerr(struct buf *, char *, char *, int, int, struct disklabel *); - -int dkcksum(struct disklabel *); - -int setdisklabel(struct disklabel *, struct disklabel *, u_long, - struct dos_partition *); - -char *readdisklabel(int, int (*)(), struct disklabel *, - struct dos_partition *, struct dkbad *, struct buf **); - -void disksort(struct buf *, struct buf *); - -int writedisklabel(int, int (*)(), struct disklabel *, - struct dos_partition *); +void diskerr __P((struct buf *, char *, char *, int, int, struct disklabel *)); +void disksort __P((struct buf *, struct buf *)); +int dkcksum __P((struct disklabel *)); + +int setdisklabel __P((struct disklabel *, struct disklabel *, u_long, + struct cpu_disklabel *)); +int cpu_setdisklabel __P((struct disklabel *, struct disklabel *, u_long, + struct cpu_disklabel *)); + +char *readdisklabel __P((int, int (*)(), struct disklabel *, + struct cpu_disklabel *)); +char *cpu_readdisklabel __P((int, int (*)(), struct disklabel *, + struct cpu_disklabel *)); + +int writedisklabel __P((int, int (*)(), struct disklabel *, + struct cpu_disklabel *)); +int cpu_writedisklabel __P((int, int (*)(), struct disklabel *, + struct cpu_disklabel *)); -int bounds_check_with_label(struct buf *, struct disklabel *, int); #endif #endif LOCORE @@ -362,3 +387,5 @@ struct disklabel *getdiskbyname __P((con __END_DECLS #endif + +#endif /* !_SYS_DISKLABEL_H_ */