]> git.sesse.net Git - vlc/blob - extras/BSDI_dvdioctl/blkreset.c
Documentation updates.
[vlc] / extras / BSDI_dvdioctl / blkreset.c
1 /*
2  * This is a (very) simple program to be used when the blocksize on a CDrom
3  * drive gets set to something other than 2048 (such as 2336 when ripping
4  * VCDs).   
5  *
6  * Uses the 'cdrom_blocksize' routine from libdvd
7 */
8
9 #include <stdio.h>
10 #include <err.h>
11 #include <fcntl.h>
12
13 main(int argc, char **argv)
14         {
15         int     fd;
16         char    *device = "/dev/rsr1c";
17
18         if      (argc != 2)
19                 errx(1, "raw device name of CDROM drive needed as arg");
20         
21         device = argv[1];
22         fd = open(device, O_RDONLY, 0);
23         if      (fd < 0)
24                 err(1, "open(%s)", device);
25
26         if      (cdrom_blocksize(fd, 2048))
27                 errx(1, "cdrom_blocksize for %s failed\n", device);
28         exit(0);
29         }