i keep getting the following error code when trying to eject my cd-rom drive, the only way i can get it to eject is by powering off.
Error ejecting: eject exited with exit code 1: eject: unable to eject, last error: Inappropriate ioctl for device
mike@hackbox:~$ eject -rv
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is
i keep getting the following error code when trying to eject my cd-rom drive, the only way i can get it to eject is by powering off.
Error ejecting: eject exited with exit code 1: eject: unable to eject, last error: Inappropriate ioctl for device
mike@hackbox:~$ eject -rv
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' i
Hello,
I wrote this simple program which prints all the arguments given to a program.
My code is straightforward and this is it
Code:
#include <stdio.h>
#include <malloc.h>
int i = 0;
int main(int argc, char** argv)
{
printf("\nargc == [%d]",argc);
printf("\nthe arguments are ");
for(i=0;i<argc;i++)
{
printf(&q
Code of baul :)
Code:
/*
* Hanx [Proyecto Fedora Peru] wth Code
* crc.c - app
*
* This program is private version, for anti-educational purposes and without any
* explicit or implicit warranty; in no event shall the author or
* contributors be liable for any direct, indirect or incidetal damages
A program from apue.
#include "apue.h"
#include <fcntl.h>
int main(int argc, char *argv[])
{
if(argc!=2)
err_quit("usage: a.out <pathname>");
if(access(argv[1], R_OK)<0)
err_ret("access error for %s",argv[1]);
else
printf("read access OK\n");
if (open(argv[1], O_RDONLY)) {
err_ret("open error for %s", argv[1]);
} else {
Hi All,
I have written a C program to solve this problem but I am eager to know whether the same output can be obtained using sed or awk?
This is the input:
Code:
star
ferry
computer
symbol
prime
time
This is the output:
Code:
starferry
ferrycomputer
computersymbol
symbolprime
primetime
This is my code written in C.
Code:
#include<stdio.h>
#include<stdlib.h>
#includ
Hey,
When I type at the shell saying
Code:
$./Name_Of_My_Executable this is a list of arguments
It goes inside the main as
Code:
int main(int argc, char** argv)
{
}
Who makes sure that the count of arguments goes to int argc and that *argv holds "the" and *(argv+1) holds "is" etc. ?
Is it the the shell itself ?
Thanks.
Trying to compile following code in terminal i got
gcc: -pthread: No such file or directory,
what does this error means and how to eliminate it?
file name: window.c
code:
#include <gtk/gtk.h>
int main(int argc, char *argv[]) {
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
AIM:to create a copy of file through pipe via two processes
1st process(parent) opens a existing file and reads size and creates a buffer and sends to pipe
2nd process(child) takes the info from pipe and creates annother buffer and writes to new file
what has occurred is a seg fault i tried so severe to find fault but could not find
suggest any code optimization if possible
CODE:
#include"he