ioctl FBIO_OSD_CMD alway return !=0 fbfd = open("/dev/fb1", O_RDWR); if (!fbfd) { printf("Error: cannot open framebuffer device.\n"); exit(1); } printf("The framebuffer device was opened successfully.\n"); if( ioctl(fbfd,FBIO_OSD_CMD,FB_OSD_SHOW)!=0) printf("set osd show false\n");
No ideas. Check that you use last svn-revision. Whats the error code (see errno) ioctl returns?
This my code is working quite well
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/types.h> #include "linux/sigma/quasar.h"
int main(int argc, char *argv) { int fd, st; struct quasar_osd_screeninfo osd; osd_command_t cmd;
fd = open("/dev/fb1", O_RDONLY); if (fd == -1) { perror("open:"); return 0; }
st = atoi(argv); if (st) cmd = FB_OSD_SHOW; else cmd = FB_OSD_HIDE; if (ioctl(fd, FBIO_OSD_CMD, &cmd) != 0) { perror("ioctl:"); return 0; } return 1; }
it's ok . ioctl(fd, FBIO_OSD_CMD, &amp;cmd) i make a mistake
Log in to post a comment.
ioctl FBIO_OSD_CMD alway return !=0
fbfd = open("/dev/fb1", O_RDWR);
if (!fbfd) {
printf("Error: cannot open framebuffer device.\n");
exit(1);
}
printf("The framebuffer device was opened successfully.\n");
if( ioctl(fbfd,FBIO_OSD_CMD,FB_OSD_SHOW)!=0) printf("set osd show false\n");
No ideas.
Check that you use last svn-revision.
Whats the error code (see errno) ioctl returns?
This my code is working quite well
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include "linux/sigma/quasar.h"
int main(int argc, char *argv)
{
int fd, st;
struct quasar_osd_screeninfo osd;
osd_command_t cmd;
fd = open("/dev/fb1", O_RDONLY);
if (fd == -1) {
perror("open:");
return 0;
}
st = atoi(argv);
if (st)
cmd = FB_OSD_SHOW;
else
cmd = FB_OSD_HIDE;
if (ioctl(fd, FBIO_OSD_CMD, &cmd) != 0) {
perror("ioctl:");
return 0;
}
return 1;
}
it's ok .
ioctl(fd, FBIO_OSD_CMD, &amp;cmd)
i make a mistake