A Pointer to non-Virtual Address, and All of my Hard drive


 
Thread Tools Search this Thread
Top Forums Programming A Pointer to non-Virtual Address, and All of my Hard drive
# 8  
Old 12-19-2005
I think he wants to do low-level I/O directly, essentially bypassing most of the kernel's protections. Essentially, hack a disk.
# 9  
Old 12-19-2005
Quote:
Originally Posted by jim mcnamara
I think he wants to do low-level I/O directly, essentially bypassing most of the kernel's protections. Essentially, hack a disk.
I got a simple kernel working. Some guy on another site said to use fopen() to get a pointer in /dev from file called disk0, disk1, disk?, etc.

I can't use this syntax without getting an error: FILE *f.

I can't include stdio.h. It gives me an error. Now I'm stuck. this platform makes it hard, because hardly any one knows it and there aren't any kernel books. I probably switch platforms in the next year, because my development is being retarded because of these issues. Unix and Windows both have a jealous amount of stuff for their platforms at my local bookstores, but the Mac section and book search produce scant.

None the less, for the time being, if anyone could help me with the stdio.h file inclusion, it would be much appreciated.
# 10  
Old 12-19-2005
iBook G4, dunno what system that is.
any case is it some linux system? some linuxes I have found throw error for stdio.h
is ur gcc and c++ compiler the same, if yes try using
#include<stdio.h>
using namespace std;

and then compile.
i think for FILE *f, u shud include fcntl.h.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Programming

Pointer and address

This code is to print out the program name and arguments list one by one: 1 #include<stdio.h> 2 3 void main(int argc, char *argv) 4 { 5 int iCount = 0; 6 while (iCount < argc) { 7 printf("argc:%d\t%s\n",iCount, argv); 8 ... (14 Replies)
Discussion started by: yifangt
14 Replies

2. UNIX for Dummies Questions & Answers

Printing pointer address

How can I print the memory address of a pointer using printf (or any other STDOUT functions?). I see in Linux its %p but not in unix, help? thanks (5 Replies)
Discussion started by: perleo
5 Replies

3. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

4. UNIX for Dummies Questions & Answers

What would the physical address be for virtual address?

Hi guys, I got one problem which I definetily no idea. What would the physical address be for virtual address? 1) 2ABC 2) 3F4B Here is the page table:see attached Thank you sos sososososso much!! (0 Replies)
Discussion started by: lemon_06
0 Replies

5. Programming

address of pointer

Hi i'm new to c programming and i'm trying to change the address of a pointer/variable but i can't seem to get it right, I have this char heap; char *firstFree = heap; char *allocMem( int size ) { void *malloc(size_t sizeofint); /*allocate space for an array with size... (19 Replies)
Discussion started by: Poison Ivy
19 Replies

6. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

7. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies
Login or Register to Ask a Question