Mercurial > illumos > illumos-gate
changeset 9911:4e2ae01f57ee
PSARC/2009/335 Parted - GNU Partition Editor Amendment
6849555 libparted: Add header files to /usr/include/parted
6850878 libparted: needs changes to work with GParted
author | Mark Logan <Mark.Logan@Sun.COM> |
---|---|
date | Fri, 19 Jun 2009 08:50:26 -0700 |
parents | b06e0c019bda |
children | ebed7eb11a25 |
files | usr/src/lib/Makefile usr/src/lib/libparted/Makefile usr/src/lib/libparted/common/libparted/arch/solaris.c usr/src/lib/libparted/common/mapfile-vers usr/src/pkgdefs/SUNWparted/prototype_i386 |
diffstat | 5 files changed, 58 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/Makefile Fri Jun 19 17:45:11 2009 +0200 +++ b/usr/src/lib/Makefile Fri Jun 19 08:50:26 2009 -0700 @@ -490,6 +490,9 @@ $(CLOSED)/lib/libike \ $(CLOSED)/lib/smartcard +i386_HDRSUBDIRS= \ + libparted + sparc_HDRSUBDIRS= \ libds \ libdscp \
--- a/usr/src/lib/libparted/Makefile Fri Jun 19 17:45:11 2009 +0200 +++ b/usr/src/lib/libparted/Makefile Fri Jun 19 08:50:26 2009 -0700 @@ -44,40 +44,38 @@ SED= sed GREP= grep +# definitions for install_h target +HDRDIR= common/include/parted +HDRS= constraint.h \ + crc32.h \ + debug.h \ + device.h \ + disk.h \ + endian.h \ + exception.h \ + filesys.h \ + geom.h \ + natmath.h \ + parted.h \ + solaris.h \ + timer.h \ + unit.h +ROOTHDRDIR= $(ROOT)/usr/include/parted +ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) + .KEEP_STATE: all clean clobber delete install package: $(SUBDIRS) -# definitions for install_h target -HDRS= ../common/include/parted/constraint.h \ - ../common/include/parted/crc32.h \ - ../common/include/parted/debug.h \ - ../common/include/parted/device.h \ - ../common/include/parted/disk.h \ - ../common/include/parted/endian.h \ - ../common/include/parted/exception.h \ - ../common/include/parted/fdasd.h \ - ../common/include/parted/filesys.h \ - ../common/include/parted/geom.h \ - ../common/include/parted/gnu.h \ - ../common/include/parted/linux.h \ - ../common/include/parted/natmath.h \ - ../common/include/parted/parted.h \ - ../common/include/parted/solaris.h \ - ../common/include/parted/timer.h \ - ../common/include/parted/unit.h \ - ../common/include/parted/vtoc.h -ROOTHDRDIR= $(ROOT)/usr/include -ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) -CHECKHDRS= $(HDRS:%.h=%.check) +install_h: $(ROOTHDRDIR) $(ROOTHDRS) + +$(ROOTHDRDIR): + mkdir -p $@ -# install rule for install_h target -$(ROOTHDRDIR)/%: % - $(INS.file) - -install_h: $(ROOTHDRS) - -check: $(CHECKHDRS) +# +# This open source is exempt from check +# +check: $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) @@ -100,3 +98,5 @@ $(INS.dir) FRC: + +include ../Makefile.targ
--- a/usr/src/lib/libparted/common/libparted/arch/solaris.c Fri Jun 19 17:45:11 2009 +0200 +++ b/usr/src/lib/libparted/common/libparted/arch/solaris.c Fri Jun 19 08:50:26 2009 -0700 @@ -412,7 +412,6 @@ int found = -1; PED_ASSERT(dev != NULL, return (found)); - PED_ASSERT(dev->open_count > 0, return (found)); PED_ASSERT(pathname != NULL, return (found)); arch_specific = SOLARIS_SPECIFIC(dev); @@ -462,7 +461,6 @@ * Now get the info about the current disk */ if (ioctl(arch_specific->fd, DKIOCINFO, &cur_disk_dkinfo) < 0) { - perror("getpartition: ioctl DKIOCINFO current disk"); (void) close(mfd); return (found); } @@ -502,7 +500,6 @@ diskaddr_t p_size; PED_ASSERT(dev != NULL, return (0)); - PED_ASSERT(dev->open_count > 0, return (0)); arch_specific = SOLARIS_SPECIFIC(dev); @@ -562,7 +559,6 @@ char *pcur_disk_path; PED_ASSERT(dev != NULL, return (found)); - PED_ASSERT(dev->open_count > 0, return (found)); /* * Truncate the characters following "d*", such as "s*" or "p*" @@ -786,7 +782,6 @@ struct mnttab *mp = &mnt_record; PED_ASSERT(dev != NULL, return (found)); - PED_ASSERT(dev->open_count > 0, return (found)); arch_specific = SOLARIS_SPECIFIC(dev); @@ -1074,7 +1069,6 @@ while (1) { status = read(arch_specific->fd, diobuf, read_length); - PED_ASSERT(status <= read_length, break); if (status > 0) memcpy(buffer, diobuf, status);
--- a/usr/src/lib/libparted/common/mapfile-vers Fri Jun 19 17:45:11 2009 +0200 +++ b/usr/src/lib/libparted/common/mapfile-vers Fri Jun 19 08:50:26 2009 -0700 @@ -52,6 +52,7 @@ ped_constraint_new; ped_debug; ped_device_close; + ped_device_destroy; ped_device_free_all; ped_device_get; ped_device_get_constraint; @@ -59,9 +60,14 @@ ped_device_is_busy; ped_device_open; ped_device_probe_all; + ped_device_read; + ped_device_sync; + ped_device_write; ped_disk_add_partition; ped_disk_check; ped_disk_commit; + ped_disk_commit_to_dev; + ped_disk_commit_to_os; ped_disk_delete_partition; ped_disk_destroy; ped_disk_extended_partition; @@ -85,6 +91,7 @@ ped_exception_set_handler; ped_exception_throw; ped_file_system_check; + ped_file_system_clobber; ped_file_system_close; ped_file_system_copy; ped_file_system_create; @@ -100,10 +107,13 @@ ped_geometry_destroy; ped_geometry_init; ped_geometry_new; + ped_geometry_read; ped_geometry_set; ped_geometry_test_inside; ped_geometry_test_overlap; ped_geometry_test_sector_inside; + ped_geometry_write; + ped_get_version; ped_malloc; ped_partition_destroy; ped_partition_flag_get_by_name;
--- a/usr/src/pkgdefs/SUNWparted/prototype_i386 Fri Jun 19 17:45:11 2009 +0200 +++ b/usr/src/pkgdefs/SUNWparted/prototype_i386 Fri Jun 19 08:50:26 2009 -0700 @@ -50,3 +50,19 @@ s none usr/lib/libparted.so=./libparted.so.8 d none usr/sbin 0755 root bin f none usr/sbin/parted 0555 root bin +d none usr/include 0755 root bin +d none usr/include/parted 0755 root bin +f none usr/include/parted/constraint.h 0644 root bin +f none usr/include/parted/crc32.h 0644 root bin +f none usr/include/parted/debug.h 0644 root bin +f none usr/include/parted/device.h 0644 root bin +f none usr/include/parted/disk.h 0644 root bin +f none usr/include/parted/endian.h 0644 root bin +f none usr/include/parted/exception.h 0644 root bin +f none usr/include/parted/filesys.h 0644 root bin +f none usr/include/parted/geom.h 0644 root bin +f none usr/include/parted/natmath.h 0644 root bin +f none usr/include/parted/parted.h 0644 root bin +f none usr/include/parted/solaris.h 0644 root bin +f none usr/include/parted/timer.h 0644 root bin +f none usr/include/parted/unit.h 0644 root bin