From 823f0fd107415ced8edde12306b9134058aafdc0 Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Mon, 21 May 2012 22:28:03 +0200 Subject: fdisk: introduce fdisk context This is the first patch that adds the initial parts of the new fdisk internal API. Two functions are created to both init and deinit the fdisk context. Only the device's descriptor and path are added as a start and these are replaced throughout fdisk.c and label specific code. All logic that opens the file does it with fdisk_new_context_from_filename(), and this enforces always opening the device with rw, then, if unsuccesfull, with read-only. This changes the current logic that opens the device with certain permissions depending on the user given options. For example, -l opens the device read-only. This patch passed regression tests and local modifications for sgi/dos/sun disk labels. Signed-off-by: Davidlohr Bueso --- fdisk/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'fdisk/Makefile.am') diff --git a/fdisk/Makefile.am b/fdisk/Makefile.am index 7851bd1b1..e9be84111 100644 --- a/fdisk/Makefile.am +++ b/fdisk/Makefile.am @@ -20,6 +20,7 @@ if !ARCH_M68K sbin_PROGRAMS = fdisk dist_man_MANS = fdisk.8 fdisk_SOURCES = \ + utils.c \ fdisk.c \ fdisk.h \ fdiskaixlabel.c \ -- cgit v1.2.3-55-g7522