Commit graph

6464 commits

Author SHA1 Message Date
Karel Zak
2e3b40d3dd libfdisk: add label->changed flag
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
d6ab93f18a fdisk: (sun) remove nasty sunlabel macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
137b57e56b fdisk: (sun) remove global variable 'partitions'
* use label counters
 * add assert()
 * use struct fdisk_label if possible

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
acf263d592 fdisk: (bsd) add partitions counters
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
15a64477ae fdisk: (aix) remove unuused variable 'partitions'
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
9fcd49d551 libfdisk: (gpt) introduce driver independent partitions counters
label->nparts_{max,cur} to later replace global variable partitions

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
d71ef5a442 fdisk: (gpt) remove global variables, cleanup header verification
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
be5f806138 fdisk: differentiate between get and read operation
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
53b422ab16 libfdisk: move label identifier to label struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
8a95621d30 libfdisk: add fdisk_label to driver API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
0559e742a9 libfdisk: improve label deinitialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
852ce62b42 libfdisk: kill dos_compatible_flag global variable
... move the variable to label private struct.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
4e0e82531a libfdisk: add fdisk_new_context(), reuse context
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
0c5d095e46 libfdisk: split label and label operations
Changes:

 - fdisk_label is a private label driver struct
 - generic header of the fdisk_label points to fdisk_label_operations
 - the private fdisk_label stuff is always allocated for all drivers
   during fdisk_context initialization

 - context->labels[] contains pointers to all supported labels (drivers)
 - context->label is a pointer to the currently used label

 This change allows to:

 - store label specific global settings (e.g. dos compatible mode,
   display units, ...) independently on the current label

 - add label specific function to the API

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:29 +01:00
Karel Zak
171372d37c libfdisk: cleanup the rest of fdisks/utils.c stuff
- remove obsolete code
 - move fdisk_{set,get}_partition_type() to label.c (this is label
   driver operation)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:28 +01:00
Karel Zak
f4be9e2b99 libfdisk: add context functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:46:37 +01:00
Karel Zak
7ce1097533 libfdisk: add probing function
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:41 +01:00
Karel Zak
c578f9af72 libfdisk: add fdisk_reset_alignment()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:41 +01:00
Karel Zak
aa42788d5f libfdisk: add topology and geometry functions
- rename __discovery_* to fdisk_discovery_*
 - rename fdisk_context_force_sector_size() to fdisk_override_sector_size()
 - rename fdisk_context_set_user_geometry() to fdisk_override_geometry()

 - remove non-default sector size warning

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:41 +01:00
Karel Zak
3eb78aa745 libfdisk: add firstsector utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:41 +01:00
Karel Zak
832f9ddf40 fdisk: remove duplicate code (already in libfdisk)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
8adbcf0ce9 libfdisk: add generic label code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
9475cc78ff libfdisk: add alignment code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
a5fe1b3f1d libfdisk: add parttype code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
a8019843ab libfdisk: add basic structs
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
f3744ac569 fdisk: use debug stuff from libfdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
d56a7c2330 libfdisk: add basic library files
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 11:20:40 +01:00
Karel Zak
9dd068103e tests: add fdisk GPT test
Note that the test does not check on-disk data (by checksum)
because the current fdisk does not allow to modify automatically
generated partition and disk UUIDs.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-06 14:36:23 +01:00
Karel Zak
0385dcf0ad tests: add fdisk BSD test
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-06 14:01:41 +01:00
Karel Zak
7a8ba79e98 tests: update fdisk mbr tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-06 12:32:34 +01:00
Karel Zak
7cabfd8677 tests: use checksum to detect rev(1) consistency
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-05 09:38:46 +01:00
Karel Zak
02658d9bb5 tests: make utmpdump TZ independent
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 13:10:09 +01:00
Karel Zak
65f25186d5 ionice: keep output backwardly compatible
...bug introduced by 8c219bf463

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:58:12 +01:00
Karel Zak
c1e12ecf2f tests: update ipcs (reorder default output)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:53:31 +01:00
Karel Zak
d0a7dc61f5 tests: update libblkid PT tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:49:11 +01:00
Karel Zak
cb768d0583 tests: update UDF test
.. blkid now returns infor from ISO header too.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:45:13 +01:00
Karel Zak
a4eb4f81a5 tests: update ISO tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:44:34 +01:00
Karel Zak
7c5dec2fa2 Merge branch 'master' of https://github.com/zec/util-linux 2013-03-04 12:40:38 +01:00
Benno Schulenberg
ceefa682b4 docs: improve wording, grammar and formatting of lsblk man page
Also sort the options alphabetically.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-04 12:33:31 +01:00
Benno Schulenberg
3768420374 docs: improve grammar and formatting of explanation of "-o +list"
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-04 12:33:25 +01:00
Bernhard Voelker
96f4747712 build-sys: add exec_shell.h to distribution
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2013-03-04 12:28:39 +01:00
Mike Frysinger
2eefe5170a unshare: tweak style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-04 12:28:37 +01:00
Mike Frysinger
47535d77d2 unshare(1): delete empty NOTES section
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-04 12:28:36 +01:00
Sami Kerola
747168d444 login: remove file descriptor leak [cppcheck]
[login-utils/login.c:510]: (error) Resource leak: fd

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-04 12:28:34 +01:00
Sami Kerola
2281e1eda3 wall: use xgethostname()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-03-04 12:28:32 +01:00
Karel Zak
9b80bef687 readprofile: fix --reest (--reset) typo
Reported-by: Branislav Blaskovic <notifications@github.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:25:47 +01:00
Zachary Catlin
5a45eb2d2c libblkid: use correct block size for UDF probe
In UDF, Volume Structure Descriptors are always 2048 bytes long (ECMA-167,
3rd ed., §2/9.1), while filesystem sectors are the same size as the sectors
of the underlying media (e.g., UDF 2.01 §1.3.2). Before this commit, the
block size was estimated from VSD offsets, which gives incorrect answers for
non-optical media. Now, the UDF probe uses the device block size by default,
falling back to 2048-byte sectors for the case of optical-disk images.

Signed-off-by: Zachary Catlin <z@zc.is>
2013-03-01 21:54:00 -05:00
Karel Zak
6a83f8ecd7 libmount: ignore name=value if only 'name' is expected
For example

	mount /srv/www /mnt -o rw,group=woven,dev,suid

the group= should not be interpreted as userspace mount option, because
umount(8) expects 'group' (without =<value>).

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-28 12:55:30 +01:00
Karel Zak
6f7bce8651 umount: add note about namespaces too --all-targets
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-27 11:23:33 +01:00
Karel Zak
956e582874 docs: update deprecated.txt
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-26 15:28:05 +01:00