[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-fdisk] work with file's.. more details!

From: Christian
Subject: [bug-fdisk] work with file's.. more details!
Date: Tue, 21 Oct 2008 19:43:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221

Excuse me for stupid questions but I'm will be sure that what I think and will make is true... :)

We must make fdisk capable to open a zero-filled binary file and use it as a disk, I'm not expert in this task but using gdb I see that when fdisk open `FILE' the device is setup with member `type' as `PED_DEVICE_FILE'. I think
this mean that libparted work ok with file.
So, when fdisk use `ped_disk_new' libparted throw an exception because `FILE' not have a partition table. If we do this
with libparted, for example:

   ~/# parted DISK
   GNU Parted 1.8.8
   Using /PATH/DISK
   Welcome to GNU Parted! Type 'help' to view a list of commands.
   (parted) print
   Error: /PATH/DISK: unrecognised disk
   (parted) mklabel
   New disk label type?
   New disk label type? pc98
   (parted) print
   Model:  (file)
   Disk /PATH/DISK: 67.1MB
   Sector size (logical/physical): 512B/512B
   Partition Table: pc98

   Number  Start  End  Size  File system  Name  Flags


As we can see, we can't handle `DISK' without a partition table, we must make it first.

Parted ask the user for `label type' and make a table using `ped_disk_new_fresh'.

How fdisk must work with an empty file? Prompt for a partition type? Use one as default? What? Show all supported partitions to user? Make this feature as extension?

Please specify in details how fdisk should work with a bynary file without partition table.

Many thank's for patience...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]