All of lore.kernel.org
 help / color / mirror / Atom feed
* calling ioctl from user space
@ 2004-04-11 16:52 jenn sirp
  2004-04-11 18:39 ` Jeff Mahoney
  0 siblings, 1 reply; 2+ messages in thread
From: jenn sirp @ 2004-04-11 16:52 UTC (permalink / raw)
  To: reiserfs-list

Hello,

I am messing with ioctl() in Reiser3. I am trying to write a simple C
program that calls the functions with the various cmd options. At the
moment, I just want to test that I am getting into the reiser ioctl
routines, but I am not sure I am going about this correctly.

I have a Resier partition on /dev/hda6 and mounted on /mnt
I am calling ioctl with something like ...

main()
{
int fd;
void * argp;

fd = open("/mnt/test.txt", "w");
ioctl(fd, REISERFS_IOC_UNPACK, argp)
}

I get various errors and have been checking errno. I get EBDAF (bad file
descriptor) when I pass a valid 'file' file descriptor but not if I pass '1'
for stdout. Maybe I am going about this the wrong way...Also... if anyone
can point me to which header files I need to include to access the right
flags etc.. -- that would be helpful too. For some reason, no matter what I
#include, I am getting compiler complaints and I can't call with
REISERFS_IOC_....etc.

Sorry if this is too much of an introduction to fs programming e-mail.

Thank you so much,

Jenn


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-11 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-11 16:52 calling ioctl from user space jenn sirp
2004-04-11 18:39 ` Jeff Mahoney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.