Separate the encoding/decoding functions for struct disklabel into a

separate source file which can be used from both kernel and userland code.
This commit is contained in:
Poul-Henning Kamp 2003-04-17 07:39:03 +00:00
parent 296e054f23
commit daabb372ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113591
7 changed files with 15 additions and 0 deletions

View File

@ -892,6 +892,7 @@ geom/bde/g_bde_work.c optional geom_bde
geom/geom_aes.c optional geom_aes
geom/geom_apple.c optional geom_apple
geom/geom_bsd.c optional geom_bsd
geom/geom_bsd_enc.c optional geom_bsd
geom/geom_ctl.c standard
geom/geom_dev.c standard
geom/geom_disk.c standard

View File

@ -192,6 +192,7 @@ dev/syscons/scvtb.c optional sc
dev/syscons/syscons.c optional sc
dev/syscons/sysmouse.c optional sc
geom/geom_bsd.c standard
geom/geom_bsd_enc.c standard
isa/atkbd_isa.c optional atkbd
isa/atkbdc_isa.c optional atkbdc
isa/fd.c optional fdc

View File

@ -147,6 +147,7 @@ dev/syscons/scvtb.c optional sc
dev/syscons/syscons.c optional sc
dev/syscons/sysmouse.c optional sc
geom/geom_bsd.c standard
geom/geom_bsd_enc.c standard
geom/geom_mbr.c standard
geom/geom_mbr_enc.c standard
gnu/i386/fpemul/div_small.s optional gpl_math_emulate \

View File

@ -93,6 +93,7 @@ dev/syscons/scvtb.c optional sc
dev/syscons/syscons.c optional sc
dev/syscons/sysmouse.c optional sc
geom/geom_bsd.c standard
geom/geom_bsd_enc.c standard
geom/geom_gpt.c standard
geom/geom_mbr.c standard
geom/geom_mbr_enc.c standard

View File

@ -124,6 +124,7 @@ dev/syscons/scterm-dumb.c optional sc
dev/syscons/scvidctl.c optional sc
dev/syscons/sysmouse.c optional sc
geom/geom_bsd.c standard
geom/geom_bsd_enc.c standard
geom/geom_pc98.c standard
gnu/i386/fpemul/div_small.s optional gpl_math_emulate \
warning "kernel contains GPL contaminated math emulator"

View File

@ -18,6 +18,7 @@ dev/ofw/openfirmio.c standard
dev/sio/sio.c optional sio
dev/sio/sio_isa.c optional sio isa
geom/geom_bsd.c standard
geom/geom_bsd_enc.c standard
geom/geom_sunlabel.c standard
libkern/ffs.c standard
kern/syscalls.c optional ktr

View File

@ -300,6 +300,15 @@ static const char *fstypenames[] = {
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
#define DIOCBSDBB _IOW('d', 110, void *) /* write bootblocks */
/*
* Functions for proper encoding/decoding of struct disklabel into/from
* bytestring.
*/
void bsd_partition_le_dec(u_char *ptr, struct partition *d);
void bsd_disklabel_le_dec(u_char *ptr, struct disklabel *d);
void bsd_partition_le_enc(u_char *ptr, struct partition *d);
void bsd_disklabel_le_enc(u_char *ptr, struct disklabel *d);
#ifndef _KERNEL
__BEGIN_DECLS
struct disklabel *getdiskbyname(const char *);