summaryrefslogtreecommitdiffstats
path: root/partx
Commit message (Collapse)AuthorAgeFilesLines
* partx: use ioctls from lib/blkdev.cKarel Zak2009-02-261-75/+13Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (and partx) remove BLKGETLASTSECTKarel Zak2009-02-261-38/+1Star
| | | | | | This odd ioctl is unsupported in the current 2.4 and 2.6 mainline. Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: don't duplicate lib/blkdev.c codeKarel Zak2009-02-261-5/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: convert hard sector size to 512-byte sectorsKarel Zak2009-02-263-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The msdos PT depends on a sector size (BLKSSZGET), but partx(8) counts internally with 512-byte sectors only. The dos.c has to convert start and size to 512-byte sectors. sysfs (kernel uses 512-byte sectors only): # cat /sys/block/sdb/sdb1/{start,size} 256 16128 (note that 16128 * 512 = 8257536; 8Mb) old version: # partx /dev/sdb 1: 32- 2047 ( 2016 sectors, 1 MB) ^^^^ start, end and sectors are correct, but in 4KiB sectors The size in MB is completely wrong. new version: # partx -l /dev/sdb 1: 256- 16383 ( 16128 sectors, 8 MB) start, end and sectors are converted to 512-byte sectors. The size in MB is correct now. Note that this change is important, because "partx -a" counts the size of a new partition in 512-byte sectors for all PT formats (sun, gpt, ...). Signed-off-by: Karel Zak <kzak@redhat.com>
* addpart: 512-byte sectors in code, bytes in man-pageKarel Zak2009-02-261-2/+2
| | | | | | | | | The addpart.c code uses 512-byte sectors for partition start and length, but in the addpart.8 man page is "in bytes". The code (and this code is pretty old) is always right... the man page has to be fixed. Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: don't redeclare daddr_tmaximilian attems2008-09-161-2/+1Star
| | | | | | | | klibc porting fix, use proper include, nuke redefinition. solaris.c:8: error: redefinition of typedef ‘daddr_t’ /usr/lib/klibc/include/sys/types.h:29: error: previous declaration of ‘daddr_t’ was here Signed-off-by: maximilian attems <max@stro.at>
* build-sys: update .gitignore filesKarel Zak2008-04-141-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: fix compiler warningsKarel Zak2008-03-205-7/+7
| | | | | | | dos.c:44: warning: pointer targets in assignment differ in signedness dos.c:93: warning: pointer targets in assignment differ in signedness Signed-off-by: Karel Zak <kzak@redhat.com>
* remove useless if-before-free tests.Jim Meyering2008-03-122-6/+4Star
| | | | | | | | | | | | | | | | E.g., in this example, the "if (p)" test is useless. if (p) free (p); I've been removing such tests systematically. Here's where I proposed it to the git folks, along with justification for why it's ok to perform this transformation, these days (no one uses SunOS4 anymore): http://thread.gmane.org/gmane.comp.version-control.git/74187 Signed-off-by: Jim Meyering <meyering@redhat.com>
* partx: use swab macros from bitops.hKarel Zak2007-12-171-62/+62
| | | | | | | | | Clean up GPT code: - remove C++ comments - tailing white-spaces - use cpu_to_ swab macros from bitops.h Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use dist_man_MANS instead of man_MANSStepan Kasal2007-12-171-1/+1
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* man pages: add "AVAILABILITY" sectionKarel Zak2007-07-033-0/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: add man pages for addpart, delpart and partxKarel Zak2007-02-094-0/+113
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add missing filesKarel Zak2007-01-041-1/+2
| | | | | | | This patch add all missing headers, man pages and README files to automake stuff and "make dist-gzip" produces useful tarball now. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove generated autotools stuff from gitKarel Zak2007-01-031-512/+0Star
| | | | | | | The generated autotools stuff shouldn't be maintained by SCM. After check out from git use ./autogen.sh. For more details see README.devel. Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre6 tarball.Karel Zak2006-12-072-21/+2Star
|
* Imported from util-linux-2.13-pre4 tarball.Karel Zak2006-12-071-0/+2
|
* Imported from util-linux-2.13-pre3 tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.13-pre2 tarball.Karel Zak2006-12-072-99/+40Star
|
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-077-17/+588
|
* Imported from util-linux-2.12b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.12a tarball.Karel Zak2006-12-072-12/+28
|
* Imported from util-linux-2.11x tarball.Karel Zak2006-12-071-2/+6
|
* Imported from util-linux-2.11u tarball.Karel Zak2006-12-071-21/+2Star
|
* Imported from util-linux-2.11t tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.11q tarball.Karel Zak2006-12-0711-21/+1289
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-079-0/+857