Re: Read/Write bytes directly from hard drive
From: tom (tom_at_dbservice.com)
Date: 04/22/05
- Next message: Michael: "Help! libtool/autoconf"
- Previous message: asharma: "Read/Write bytes directly from hard drive"
- In reply to: asharma: "Read/Write bytes directly from hard drive"
- Next in thread: Grant Edwards: "Re: Read/Write bytes directly from hard drive"
- Reply: Grant Edwards: "Re: Read/Write bytes directly from hard drive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 22 Apr 2005 23:12:15 +0200
asharma wrote:
> We are writing a disk partitioner from scratch. We were not sure how to
> access any byte from the disk, including the master table or any other
> data. Are there any system calls that handle read/write operations?
>
int fd = open("/dev/hda", O_SYNC);
Read the first x bytes and you get the partition table of your first IDE
disk. Replace x with the size of your partition table.
tom
- Next message: Michael: "Help! libtool/autoconf"
- Previous message: asharma: "Read/Write bytes directly from hard drive"
- In reply to: asharma: "Read/Write bytes directly from hard drive"
- Next in thread: Grant Edwards: "Re: Read/Write bytes directly from hard drive"
- Reply: Grant Edwards: "Re: Read/Write bytes directly from hard drive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|