summaryrefslogtreecommitdiffstats
path: root/libfdisk/docs
Commit message (Collapse)AuthorAgeFilesLines
* libfdisk: add fdisk_assign_device_by_fd()Karel Zak2019-06-181-0/+1
| | | | | | | | It's possible that caller has the device already opened for some other task, so let's reuse the file descriptor. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_script_set_table()Karel Zak2019-06-171-0/+1
| | | | | | | | | | | | This small change improves possibility to modify by script described PT and use script API in another tools as primary way to create partitions. All you need is to compose script by fdisk_script_set_header() and fdisk_script_set_table() and than apply by fdisk_apply_script(). Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) add reference to v2.33Karel Zak2019-06-071-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) add missing functionKarel Zak2018-09-191-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_get_devmodel() and fdisk_get_devno()Karel Zak2018-08-301-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) update yearKarel Zak2018-03-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: fix docs warningsKarel Zak2018-02-211-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) add missing docs blocksKarel Zak2018-02-211-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: fix typos using codespellRuediger Meier2018-02-161-1/+1
| | | | | | Some more funny typos, please review carefully. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libfdisk: add fdisk_save_user_grain()Karel Zak2017-08-221-0/+1
| | | | | | | | | | | Let's provide API for applications that don't want to use the default 1MiB grain. The new function allow to use "as minimal as possible" if grain is set by fdisk_save_user_grain() to 512. If the phy sector size (or minimal I/O size) is greater than specified grain size than smallest possible setting is used. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_disable_dialogs()Karel Zak2017-07-191-0/+2
| | | | | | | | | | | | | | | The default (for historical reasons) is to use dialog driven partitioning. It's possible to avoid dialogs by fdisk_partition template for fdisk_add_partition(). Unfortunately in some case (mostly DOS driver) it's not enough, because we need to distinguish between logical and primary partitions. If we know that dialogs are unwanted then we can default to primary partition, etc. This function simplify semantic of the library for non-interactive programs. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: use BLKPG ioctls to inform kernel about changesKarel Zak2017-07-141-0/+1
| | | | | | | | | | | | | This patch introduces fdisk_reread_changes(). The function is less invasive alternative to fdisk_reread_partition_table(). The new function uses BLKPG ioctls for modified partitions. The another partitions are not affected. This solution allows to successfully use fdisks on disk where some partitions are still use (mounted). For example if you want to resize the last partition on the device. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_device_is_used()Karel Zak2017-07-141-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: move fdisk_reread_partition_table() to another fileKarel Zak2017-07-141-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_reassign_device()Karel Zak2017-07-101-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: update docsKarel Zak2017-05-232-1/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) add missing 'since' tagsKarel Zak2017-05-231-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_partition_has_wipe()Karel Zak2017-05-091-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: classify collision typeKarel Zak2017-02-141-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: don't use blkdev ioctls for regular filesKarel Zak2017-01-131-0/+1
| | | | | | | | | | | | | $ fdisk <diskimage> open("sdc.img", O_RDONLY|O_CLOEXEC) = 3 ioctl(3, BLKSSZGET, 0x7ffcf51357c4) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, BLKGETSIZE64, 0x7ffcf51357b0) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, BLKGETSIZE, 0x7ffcf51356c8) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, FDGETPRM, 0x7ffcf51356d0) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, HDIO_GETGEO, 0x7ffcf5135790) = -1 ENOTTY (Inappropriate ioctl for device) Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: replace FTP by HTTPS in kernel.org URLsSébastien Helleu2016-12-191-1/+1
| | | | | | | The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: some random fixesKarel Zak2016-09-271-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) add missing version notesKarel Zak2016-09-271-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: cleanup fdisk_gpt_set_npartitions()Karel Zak2016-06-211-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: Fix various typosSebastian Rasmussen2016-05-311-1/+1
| | | | Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* libfdisk: add API for work with labelitemsKarel Zak2016-05-121-7/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_wipe_partition()Karel Zak2016-05-041-0/+1
| | | | | | | | | | | | | | | | | | | Now libfdisk provides functionality wipe disk device only ([s]fdisk option --wipe). This patch allows to probe for filesystems/RAIDs on newly created partitions. It means we can remove signatures before the partition node (device) is created. This reduces udev events and it's unnecessary to call wipefs for all partitions. For example sfdisk --wipe=always --wipe-partitions=always /dev/sda <<< ... EOF is a elegant way how to create new disk layout without any obsolete filesystems/RAIDs. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add API to control signatures wipingKarel Zak2016-02-181-0/+3
| | | | | | | | | | | | | | | | | Now libfdisk warns if another filesystem/RAID/PT signature is detected on the device. It seems better and user-friendly to make it possible to wipe the signatures when we write a new disk label to the device. This patch adds to the library API fdisk_enable_wipe() fdisk_has_wipe() fdisk_get_collision() to control this new feature. The device modification is done by libblkid (the same we use in some mkfs-like utils). Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add JSON dump outputKarel Zak2015-06-151-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix gtk-docs related warningsKarel Zak2015-05-282-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_label_get_fields_ids_all()Karel Zak2015-05-111-0/+1
| | | | | | | | The current fdisk_label_get_fields_ids() is too smart as it differentiate between details mode etc. It's useful for default output, but in some cases it's better to provide all output fields. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) add API for raw partition attributesMichael Marineau2015-05-051-0/+2
| | | | | | | | | | | | | | | | | The existing APIs can only toggle individual bits or get and set bits in a complex text representation, making it impractical to use libfdisk for manipulating the GPT partition attribute field in more complex ways such as updating a value that is multiple bits wide. For example priority based partition selection originally designed for ChromeOS includes two integer values that are 4-bits wide. http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Trusting-the-GPT [kzak@redhat.com: - add new symbols to .sym file and docs - remove unused variables from test program] Signed-off-by: Michael Marineau <michael.marineau@coreos.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fdisk_table_get_partition_by_partno()Karel Zak2015-04-221-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support bootbits protection from (p)MBRKarel Zak2015-04-131-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add fgets() callback for scriptsKarel Zak2015-03-251-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add some docsKarel Zak2015-02-101-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (docs) fix typoKarel Zak2015-01-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdiskL add API to print SIZE field in bytesKarel Zak2015-01-191-0/+2
| | | | | | The patch also add --bytes to fdisk and fdisk. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add version.cKarel Zak2015-01-132-1/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update API docs yearsKarel Zak2015-01-131-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: cleanup gtk-docs warningsKarel Zak2015-01-131-1/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: remove 'end' from struct fdisk_partitionKarel Zak2014-12-041-0/+2
| | | | | | This struct member duplicate "start+size". Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: add API docsKarel Zak2014-11-265-0/+475
Signed-off-by: Karel Zak <kzak@redhat.com>