summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.h
diff options
context:
space:
mode:
authorDavidlohr Bueso2012-04-27 13:23:51 +0200
committerKarel Zak2012-05-02 09:33:46 +0200
commit34574201787722fecf12c37f33aad026ea2e5d9e (patch)
treed1435be629980a117543777a3c9d2e894c0f704d /fdisk/fdisk.h
parentfdisk: remove listing variable (diff)
downloadkernel-qcow2-util-linux-34574201787722fecf12c37f33aad026ea2e5d9e.tar.gz
kernel-qcow2-util-linux-34574201787722fecf12c37f33aad026ea2e5d9e.tar.xz
kernel-qcow2-util-linux-34574201787722fecf12c37f33aad026ea2e5d9e.zip
fdisk: rework fatal errors
When the device cannot be opened, there's no point calling fatal() when we can just use err(3). When any other kind of fatal error occurs it's Ok, in addition we can also go ahead and close the descriptor before exiting the program as it's currently leaking. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'fdisk/fdisk.h')
-rw-r--r--fdisk/fdisk.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index 01e3d7239..3c5110107 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -44,9 +44,12 @@ enum menutype {
EXPERT_MENU,
};
-enum failure {ioctl_error,
- unable_to_open, unable_to_read, unable_to_seek,
- unable_to_write};
+enum failure {
+ ioctl_error,
+ unable_to_read,
+ unable_to_seek,
+ unable_to_write
+};
struct geom {
unsigned int heads;