Karel Zak
6bec87105c
fdisk: use canonicalized names for -l (and sfdisk -d)
...
.. no more /dev/dm-X in "fdisk -l" and "sfdisk -d" output, always use
/dev/mapper/<name>.
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-12-17 01:28:59 +01:00
Karel Zak
3b19e88dab
fdisk: cleanup help, add -h option
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-15 10:08:03 +01:00
Karel Zak
b2f15782a7
fdisk: fix strict-aliasing bugs
...
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>
2009-10-17 00:18:46 +02:00
Karel Zak
17d0d058fc
fdisk: use c.h
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:26:46 +02:00
Karel Zak
e7fa917a33
fdisk: add MAC label detection
...
This patch is based on the old Suse util-linux-2.11q-fs_mac.diff patch.
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 23:49:56 +02:00
Karel Zak
024353c9ea
fdisk: move duplicate stuff from fdisk*label.h to fdisk.h
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 23:36:08 +02:00
Karel Zak
bf8df99191
fdisk: fix "type qualifiers ignored on function return type"
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-31 15:02:13 +02:00
Karel Zak
be97c5f361
fdisk: use unsigned long long instead int for sectors
...
The patch is originally based on an old Suse patch.
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-05-31 15:00:50 +02:00
Karel Zak
cf6d7faebb
Imported from util-linux-2.13-pre6 tarball.
2006-12-07 00:27:13 +01:00
Karel Zak
5213517f54
Imported from util-linux-2.12l tarball.
2006-12-07 00:26:28 +01:00
Karel Zak
df1dddf9ff
Imported from util-linux-2.12 tarball.
2006-12-07 00:26:12 +01:00
Karel Zak
e8f2641919
Imported from util-linux-2.11m tarball.
2006-12-07 00:25:49 +01:00
Karel Zak
c07ebfa1e0
Imported from util-linux-2.11b tarball.
2006-12-07 00:25:46 +01:00
Karel Zak
22853e4a82
Imported from util-linux-2.10m tarball.
2006-12-07 00:25:43 +01:00
Karel Zak
eb63b9b8f4
Imported from util-linux-2.10f tarball.
2006-12-07 00:25:41 +01:00
Karel Zak
7eda085c41
Imported from util-linux-2.9v tarball.
2006-12-07 00:25:39 +01:00
Karel Zak
5c36a0eb7c
Imported from util-linux-2.9i tarball.
2006-12-07 00:25:37 +01:00