summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisksgilabel.c
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: check index before access to array [coverity scan]Karel Zak2011-03-171-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use xalloc libFrancesco Cosoleto2011-01-231-1/+2
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* fdisk: fix freespace boundaries calculation on SGI disklabelKarel Zak2010-11-291-0/+3
| | | | | | | Thanks to Aurelien Jarno <aurelien@aurel32.net> Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510130 Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix strict-aliasing bugsKarel Zak2009-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 4.4 produces tons of "dereferencing type-punned pointer will break strict-aliasing rules" warnings for fdisk code where is char buffer[BUFSIZ]; ((struct disklabel *) MBRBuffer)->foo There are two ways how fix the problem: 1/ union { char buffer[BUFSIZ], struct disklabel label } MBRBuffer; 2/ use allocated buffer, this way seems less invasive. This patch implements 2/. Old version: $ make -C fdisk | grep -c warning 236 New version: $ make -C fdisk | grep -c warning 0 About aliasing: - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40665 - http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html - C99 Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: sgi label - remove duplicate swab16swab[16,32]() definitionsKarel Zak2009-10-161-13/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove unnecessary gettext callKarel Zak2008-12-121-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: several strings without gettext callsPedro Ribeiro2008-10-031-1/+1
| | | | | Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: non-linux support (BLK* and HDIO_*)Samuel Thibault2008-07-241-0/+2
| | | | | | | | | | BLK* and HDIO_* are not available on all platform. Work around this in a few places. [kzak@redhat.com: split the original patch to small patches] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: non-linux support (use standard uintxy_t instead __uxy)Samuel Thibault2007-12-031-7/+7
| | | | | | | | - #include <linux/types.h> is turned into #include <stdint.h>, much more   portable, and __uxy were turned into uintxy_t. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup usage of linux/major.hSamuel Thibault2007-11-281-1/+0Star
| | | | | | | | The utils like fdisk or login are usable on non-linux systems. This patch allows to compile on systems without linux/major.h. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* fdisk: cleanup BLK* ioctls usageKarel Zak2007-11-071-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: check returns in fdisk from partition changesMike Frysinger2007-07-161-3/+4
| | | | | | | | | currently the code in fdisk which changes partition types is a bit fragile ... it assumes the partition type succeeded instead of checking the user input or for errors. ive tweaked the sub functions to return a value indicative of the functions' success and fdisk now checks/reports based on that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fdisk: fix "differ in signedness" compiler warningsKarel Zak2007-07-021-9/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use unsigned long long instead int for sectorsKarel Zak2007-05-311-2/+2
| | | | | | The patch is originally based on an old Suse patch. Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre6 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.12l tarball.Karel Zak2006-12-071-5/+7
|
* Imported from util-linux-2.12i tarball.Karel Zak2006-12-071-6/+4Star
|
* Imported from util-linux-2.12d tarball.Karel Zak2006-12-071-5/+8
|
* Imported from util-linux-2.12pre tarball.Karel Zak2006-12-071-9/+5Star
|
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-593/+576Star
|
* Imported from util-linux-2.11r tarball.Karel Zak2006-12-071-1/+0Star
|
* Imported from util-linux-2.11m tarball.Karel Zak2006-12-071-3/+2Star
|
* Imported from util-linux-2.11f tarball.Karel Zak2006-12-071-18/+15Star
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-22/+28
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-122/+98Star
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-92/+90Star
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-0/+888