From 379ec015edc652a8ac2e7d6d129f34cadd502c2c Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Fri, 24 Dec 2010 14:48:34 -0700 Subject: [PATCH] record all those nice NMUs --- debian/changelog | 26 ++++++++++++++++++++++++++ debian/control | 2 +- debian/rules | 6 ++++-- lib/blkdev.c | 15 +++++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2e8900a0..6c4423aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,29 @@ +util-linux (2.17.2-3.3) unstable; urgency=low + + * Non-maintainer upload. + * Report correct disk size on GNU/kFreeBSD. Thanks Tuco. + (Closes: #592292) + + -- Robert Millan Wed, 29 Sep 2010 09:18:08 +0200 + +util-linux (2.17.2-3.2) unstable; urgency=low + + * Non-maintainer upload. + * Revert the switch from slang2 to ncurses5. There is no udeb for ncurses, + so that change broke cfdisk-udeb (closes: #593374, reopens: #581631). + + -- Julien Cristau Thu, 23 Sep 2010 21:12:33 +0200 + +util-linux (2.17.2-3.1) unstable; urgency=high + + * Non-maintainer upload. + * Apply trivial patch by Adam D. Barratt (thanks!): Only attempt to link + locale-specific files in to the cfdisk-udeb hierarchy if cfdisk-udeb + is actually being built. Closes: #581725 + * Set urgency to “high” since some packages are waiting for util-linux. + + -- Cyril Brulebois Sun, 20 Jun 2010 16:03:46 +0200 + util-linux (2.17.2-3) unstable; urgency=low [LaMont Jones] diff --git a/debian/control b/debian/control index e7f23d37..e915394f 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: util-linux -Build-Depends: libncurses5-dev, libncurses5, gettext, zlib1g-dev, dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], debhelper (>=5), lsb-release, pkg-config +Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4), gettext, zlib1g-dev, dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], debhelper (>=5), lsb-release, pkg-config Section: base Priority: required Uploaders: Scott James Remnant diff --git a/debian/rules b/debian/rules index f947f061..c164ab73 100755 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,7 @@ export arch = $(DEB_HOST_ARCH) version := $(shell sed -e '1{;s|^util-linux (\(.*\))\ .*|\1|;q;}' debian/changelog) Upstream := $(shell sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog) -CONFOPTS= --enable-raw --enable-rdev --enable-partx +CONFOPTS= --enable-raw --enable-rdev --enable-partx --with-slang ifeq ($(DEB_HOST_ARCH_OS),linux) CONFOPTS += --with-selinux endif @@ -137,7 +137,9 @@ endif ln util-linux/sbin/*fdisk fdisk-udeb/usr/sbin/; \ S=fdisk-udeb/usr/sbin/cfdisk; if [ -f $$S ]; then mv $$S cfdisk-udeb/usr/sbin/; fi; \ fi - cd debian/util-linux-locales && find usr/share/locale -type f | while read x; do ln $$x ../cfdisk-udeb/$$x; done + if [ -d debian/cfdisk-udeb ]; then \ + cd debian/util-linux-locales && find usr/share/locale -type f | while read x; do ln $$x ../cfdisk-udeb/$$x; done \ + fi ifeq ($(DEB_HOST_ARCH_OS),linux) install -m 644 debian/mount.fstab debian/mount/usr/share/doc/mount/examples/fstab ifeq ($(arch),$(findstring $(arch),powerpc ppc64)) diff --git a/lib/blkdev.c b/lib/blkdev.c index 1ca4548b..0ff9ce32 100644 --- a/lib/blkdev.c +++ b/lib/blkdev.c @@ -3,6 +3,10 @@ #include #include +#ifdef __FreeBSD_kernel__ +#include +#endif + #include "blkdev.h" #include "linux_version.h" @@ -67,6 +71,17 @@ blkdev_get_size(int fd, unsigned long long *bytes) return -1; #endif /* BLKGETSIZE */ +#ifdef __FreeBSD_kernel__ + { + off_t size; + + if (ioctl(fd, DIOCGMEDIASIZE, &size) >= 0) { + *bytes = size; + return 0; + } + } +#endif + *bytes = blkdev_find_size(fd); return 0; } -- 2.39.5