Hrrm, no 'edit post' option.
The error, as I report it above, is not quite accurate.. none the less, it's what's happening in essence, and you can see my code to suggest improvements upon, if you'd be so kind :)
Here's the basis of the code:
while (1) {
printf ("Exit loop (E) or Enter full path for execution :\t");
fgets(inp, INPLEN, stdin);
if ((p=strchr(inp, '\n')) != NULL) *p = '\0';
if (strcmp(inp, "E")==0) break;
if ((curpid=fork())==0) {
if (execve(inp...
fair enough.
does memset cover input streams? ie. stdin (and obviously it does, being a buffer)
question becomes, then, what is the best way to clear the input buffer.
fflush -never- works. :P
(at least not in it's simplest, fflush(stdin) form)
(just asking to confirm. i'm doing uni 2nd yr...
Very basic question, hoped it'd be in an FAQ under some sort of "handy tip" heading.. not so.
Anyway, so I have a while loop of some description, a string is read in, I analyse it's contents and act accordingly.
At the end of this loop, I want to clear the string, something along the...
Ok, problem is my dev/hda5 file was replaced somehow. This file represented a fat32 partition which I'm sharing between windows98 and linux.
I must have stupidly saved something over it, god knows how, but in its place was an ascii file containing a bunch of garbage. (But it was viewable, as...
Ok, problem is the dev/hda5 file was replaced somehow.
I must have stupidly saved something over it, god knows how, but in its place was an ascii file containing a bunch of garbage. (But it was viewable, as opposed to the other hda* files which prompt me for an application to open them in)...
ls -l hda* (I assume you mean hda* and not hd*, which is almost the entire directory ;)) shows up all the usual numbers, and they're all labeled disk except for hda5 (which is my shared partition) :
-rw-r--r-- 1 root root 3811 Sep 30 18:06 /dev/hda5
as opposed to the others...
Done all that. Same problem, when I boot up.
Gives me exactly the same error about it not being a block device.
If mount won't mount it, it aint gonna be mounted through fstab. :(
Ok.. Basically I have my HD set up with a 15 gig win98SE primary partition, a 15 gig shared fat32 partition, and a 10 gig redhat 7.2 partition.
No problems, got it dual-booting fine. Win98 has no problems recognising the shared drive, and nor did Linux, until I rebooted today and suddenly...
Yeah, I'd read about this in an FAQ or two, but they always referred to this 1024 cylinder problem as something that happened to older machines, or older BIOS's. I'm currently on an Epox 8kha+ and had thought it immune, but more than likely this is not the case.
I'll give it a shot - few...
1. The extended dos partition is intended as "shared" fat32 disk space, which both operating systems can access.
2. This is all on a single HD, I don't have the option of switching HD's.. basically I want access to both operating systems, but don't need much space on either, so I'll...
Basically I'm setting up my computer to dual boot win98 SE and redhat 7.2 on a 40 gig seagate drive. I've used the 98 SE version of fdisk, from the cd, to make 1 primary DOS partition of 15 gig + 1 logical DOS drive of 15 gig. Both have been formatted to FAT32, and there is currently around 8gig...
Hello.
Was just wondering if there's a C function to clear the screen, in dos.. without pumping it full of newlines.. the equivalent of CLS, essentially.
Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.