Commit a1ae13a4 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds

[PATCH] cosmetic fixes for example programs in Documentation/cdrom/sbpcd

This patch makes a few minor changes to the example programs in
Documentation/cdrom/sbpcd to kill off some warnings and build failures.
Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8c0e33c1
...@@ -419,6 +419,7 @@ into the file "track01": ...@@ -419,6 +419,7 @@ into the file "track01":
*/ */
#include <stdio.h> #include <stdio.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/types.h>
#include <linux/cdrom.h> #include <linux/cdrom.h>
static struct cdrom_tochdr hdr; static struct cdrom_tochdr hdr;
...@@ -429,7 +430,7 @@ static int datafile, drive; ...@@ -429,7 +430,7 @@ static int datafile, drive;
static int i, j, limit, track, err; static int i, j, limit, track, err;
static char filename[32]; static char filename[32];
main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
/* /*
* open /dev/cdrom * open /dev/cdrom
...@@ -516,6 +517,7 @@ entry[track+1].cdte_addr.lba=entry[track].cdte_addr.lba+300; ...@@ -516,6 +517,7 @@ entry[track+1].cdte_addr.lba=entry[track].cdte_addr.lba+300;
} }
arg.addr.lba++; arg.addr.lba++;
} }
return 0;
} }
/*===================== end program ========================================*/ /*===================== end program ========================================*/
...@@ -564,15 +566,16 @@ Appendix -- the "cdtester" utility: ...@@ -564,15 +566,16 @@ Appendix -- the "cdtester" utility:
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/types.h>
#include <linux/cdrom.h> #include <linux/cdrom.h>
#ifdef AZT_PRIVATE_IOCTLS #ifdef AZT_PRIVATE_IOCTLS
#include <linux/../../drivers/cdrom/aztcd.h> #include <linux/../../drivers/cdrom/aztcd.h>
#endif AZT_PRIVATE_IOCTLS #endif /* AZT_PRIVATE_IOCTLS */
#ifdef SBP_PRIVATE_IOCTLS #ifdef SBP_PRIVATE_IOCTLS
#include <linux/../../drivers/cdrom/sbpcd.h> #include <linux/../../drivers/cdrom/sbpcd.h>
#include <linux/fs.h> #include <linux/fs.h>
#endif SBP_PRIVATE_IOCTLS #endif /* SBP_PRIVATE_IOCTLS */
struct cdrom_tochdr hdr; struct cdrom_tochdr hdr;
struct cdrom_tochdr tocHdr; struct cdrom_tochdr tocHdr;
...@@ -590,7 +593,7 @@ union ...@@ -590,7 +593,7 @@ union
struct cdrom_msf msf; struct cdrom_msf msf;
unsigned char buf[CD_FRAMESIZE_RAW]; unsigned char buf[CD_FRAMESIZE_RAW];
} azt; } azt;
#endif AZT_PRIVATE_IOCTLS #endif /* AZT_PRIVATE_IOCTLS */
int i, i1, i2, i3, j, k; int i, i1, i2, i3, j, k;
unsigned char sequence=0; unsigned char sequence=0;
unsigned char command[80]; unsigned char command[80];
...@@ -738,7 +741,7 @@ void display(int size,unsigned char *buffer) ...@@ -738,7 +741,7 @@ void display(int size,unsigned char *buffer)
} }
} }
main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
printf("\nTesting tool for a CDROM driver's audio functions V0.1\n"); printf("\nTesting tool for a CDROM driver's audio functions V0.1\n");
printf("(C) 1995 Eberhard Moenkeberg <emoenke@gwdg.de>\n"); printf("(C) 1995 Eberhard Moenkeberg <emoenke@gwdg.de>\n");
...@@ -1046,12 +1049,13 @@ main(int argc, char *argv[]) ...@@ -1046,12 +1049,13 @@ main(int argc, char *argv[])
rc=ioctl(drive,CDROMAUDIOBUFSIZ,j); rc=ioctl(drive,CDROMAUDIOBUFSIZ,j);
printf("%d frames granted.\n",rc); printf("%d frames granted.\n",rc);
break; break;
#endif SBP_PRIVATE_IOCTLS #endif /* SBP_PRIVATE_IOCTLS */
default: default:
printf("unknown command: \"%s\".\n",command); printf("unknown command: \"%s\".\n",command);
break; break;
} }
} }
return 0;
} }
/*==========================================================================*/ /*==========================================================================*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment