partx: integrate support for mac and sun partitions, based on kpartx. Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- TODO | 2 +- partx/Makefile.am | 2 +- partx/partx.c | 2 ++ partx/partx.h | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 4d44434..e009f11 100644 --- a/TODO +++ b/TODO @@ -89,7 +89,7 @@ misc * use something better than gtk-doc (doxyden?) - * partx: copy sun.c, mac.c and dash.c from kpartx + * partx: dash.c from kpartx git://git.kernel.org/pub/scm/linux/storage/multipath-tools/.git * swapon -s -- LABELs support diff --git a/partx/Makefile.am b/partx/Makefile.am index 36163aa..a26963e 100644 --- a/partx/Makefile.am +++ b/partx/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Makefile.am if BUILD_PARTX usrsbin_exec_PROGRAMS = addpart delpart partx -partx_SOURCES = bsd.c dos.c partx.c solaris.c unixware.c gpt.c crc32.c \ +partx_SOURCES = bsd.c dos.c partx.c solaris.c unixware.c sun.c mac.c gpt.c crc32.c \ efi.h gpt.h crc32.h partx.h dos.h $(top_srcdir)/lib/blkdev.c if LINUX diff --git a/partx/partx.c b/partx/partx.c index 14d2609..aa5a2ad 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -83,6 +83,8 @@ initpts(void) addpts("bsd", read_bsd_pt); addpts("solaris", read_solaris_pt); addpts("unixware", read_unixware_pt); + addpts("sun", read_sun_pt); + addpts("mac", read_mac_pt); } static char short_opts[] = "ladgvn:t:"; diff --git a/partx/partx.h b/partx/partx.h index d98d77a..cfbd322 100644 --- a/partx/partx.h +++ b/partx/partx.h @@ -15,11 +15,15 @@ struct slice { unsigned int start; unsigned int size; + int container; + int major; + int minor; }; typedef int (ptreader)(int fd, struct slice all, struct slice *sp, int ns); extern ptreader read_dos_pt, read_bsd_pt, read_solaris_pt, read_unixware_pt, read_gpt_pt; +extern ptreader read_sun_pt, read_mac_pt; unsigned char *getblock(int fd, unsigned int secnr); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html