....are there any? I have searched but all my searching has gone in <vane|vein|vien>
edit: ok, i am tired...what a stupid question.... let's try, are there any low-level disk operations for linux?
....are there any? I have searched but all my searching has gone in <vane|vein|vien>
edit: ok, i am tired...what a stupid question.... let's try, are there any low-level disk operations for linux?
Last edited by misplaced; 12-17-2004 at 08:33 AM.
i seem to have GCC 3.3.4
But how do i start it?
I dont have a menu for it or anything.
>all my searching has gone in <vane|vein|vien>
"all my searching has been in vain".
>....are there any?
What kind of low level disk operations are you talking about? That's a rather broad topic, so it's difficult to give you an accurate answer.
>let's try, are there any low-level disk operations for linux?
Yes.
My best code is written with the delete key.
For some reason I'm thinking he means something in the way of direct hardware access. If so, no there aren't any. All such operations are very OS specific.
Well, there are, but not in userspace. Kernel modules are a different matter. (Not that it is a good idea to use them even there.)
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
well, i would like to be able to emulate linux's "dd" command...i think if i knew how to do that, then i would know how to do anything else that i might possibly want to do (write a bootloader{just to say i can}, copy the FAT, copy partition table, etc)......
now that i realize i pretty much have to choose an OS and stick with it, maybe i should look at the "dd" source
i seem to have GCC 3.3.4
But how do i start it?
I dont have a menu for it or anything.
dd's source looks something like this:
This simple (relatively...) source is possible because Unices offer access to the devices via the device files in a uniform way. Whether the input and output are files, hard disks, tape drives or whatever doesn't matter at all to dd.Code:int main(int argc, char **argv) { handle_absurdly_complex_cmdline(argc, argv); int input = open(inputfilename_or_stdin, F_READ); int output = open(outputfilename_or_stdout, F_WRITE | configured_additional_flags); char *buffer = malloc(configured_buffer_size); while(!input_eof_or_configured_copy_size_reached) { read(input, buffer, configured_block_size); write(output, buffer, configured_block_size); } }
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
well then, i guess there's only one thing left to figure out before i get start (doing what ever i'm going to do)....
i'm still unclear on one thing however....to my understanding -
the master boot record is the first sector on the master drive. within this sector is the partition table for the master drive. each partition has it's own boot sector which is located in the first sector of the partition. the filesystem resides within it's partition's boot sector.
is this correct so far?
i seem to have GCC 3.3.4
But how do i start it?
I dont have a menu for it or anything.
I her code isn't clear to you if you are used to a windows environment. But as far as things go in a Unix type system, everything is a file. Thus everything can be operated on as a file. I should point out that if you are wanting to make your own simple dd program, you could start by reading the actual dd source code.
perhaps being able to emulate dd is not what i want.....
let's put it this way, i want to be able to read and write to the mbr, boot sectors, filesystems, etc......maybe i should look at the source to lilo installer, fdisk, and mk2fs instead/also.
(btw, my intentions are pure...this curiosity came about while i was trying to figure out a way to make an image of windows that i could easily restore which has now spawned into a much grander desire - TOTAL DOMINATION! BWAAAHAHAH BWAAAHAAHAHAHA - my PC will bow down before me and be my subservient gimp for all eternity)
i seem to have GCC 3.3.4
But how do i start it?
I dont have a menu for it or anything.
Power over computers is an illusion.
Yes, you can read all that stuff by directly accessing hdx(n), but that doesn't mean that you'd actually know where the stuff is. lilo installer might be a good place to look, though.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law