[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: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Jesper Juhl and committed by Linus Torvalds a1ae13a4 8c0e33c1

+10 -6
+10 -6
Documentation/cdrom/sbpcd
··· 419 */ 420 #include <stdio.h> 421 #include <sys/ioctl.h> 422 #include <linux/cdrom.h> 423 424 static struct cdrom_tochdr hdr; ··· 430 static int i, j, limit, track, err; 431 static char filename[32]; 432 433 - main(int argc, char *argv[]) 434 { 435 /* 436 * open /dev/cdrom ··· 517 } 518 arg.addr.lba++; 519 } 520 } 521 /*===================== end program ========================================*/ 522 ··· 566 #include <stdio.h> 567 #include <malloc.h> 568 #include <sys/ioctl.h> 569 #include <linux/cdrom.h> 570 571 #ifdef AZT_PRIVATE_IOCTLS 572 #include <linux/../../drivers/cdrom/aztcd.h> 573 - #endif AZT_PRIVATE_IOCTLS 574 #ifdef SBP_PRIVATE_IOCTLS 575 #include <linux/../../drivers/cdrom/sbpcd.h> 576 #include <linux/fs.h> 577 - #endif SBP_PRIVATE_IOCTLS 578 579 struct cdrom_tochdr hdr; 580 struct cdrom_tochdr tocHdr; ··· 593 struct cdrom_msf msf; 594 unsigned char buf[CD_FRAMESIZE_RAW]; 595 } azt; 596 - #endif AZT_PRIVATE_IOCTLS 597 int i, i1, i2, i3, j, k; 598 unsigned char sequence=0; 599 unsigned char command[80]; ··· 741 } 742 } 743 744 - main(int argc, char *argv[]) 745 { 746 printf("\nTesting tool for a CDROM driver's audio functions V0.1\n"); 747 printf("(C) 1995 Eberhard Moenkeberg <emoenke@gwdg.de>\n"); ··· 1049 rc=ioctl(drive,CDROMAUDIOBUFSIZ,j); 1050 printf("%d frames granted.\n",rc); 1051 break; 1052 - #endif SBP_PRIVATE_IOCTLS 1053 default: 1054 printf("unknown command: \"%s\".\n",command); 1055 break; 1056 } 1057 } 1058 } 1059 /*==========================================================================*/ 1060
··· 419 */ 420 #include <stdio.h> 421 #include <sys/ioctl.h> 422 + #include <sys/types.h> 423 #include <linux/cdrom.h> 424 425 static struct cdrom_tochdr hdr; ··· 429 static int i, j, limit, track, err; 430 static char filename[32]; 431 432 + int main(int argc, char *argv[]) 433 { 434 /* 435 * open /dev/cdrom ··· 516 } 517 arg.addr.lba++; 518 } 519 + return 0; 520 } 521 /*===================== end program ========================================*/ 522 ··· 564 #include <stdio.h> 565 #include <malloc.h> 566 #include <sys/ioctl.h> 567 + #include <sys/types.h> 568 #include <linux/cdrom.h> 569 570 #ifdef AZT_PRIVATE_IOCTLS 571 #include <linux/../../drivers/cdrom/aztcd.h> 572 + #endif /* AZT_PRIVATE_IOCTLS */ 573 #ifdef SBP_PRIVATE_IOCTLS 574 #include <linux/../../drivers/cdrom/sbpcd.h> 575 #include <linux/fs.h> 576 + #endif /* SBP_PRIVATE_IOCTLS */ 577 578 struct cdrom_tochdr hdr; 579 struct cdrom_tochdr tocHdr; ··· 590 struct cdrom_msf msf; 591 unsigned char buf[CD_FRAMESIZE_RAW]; 592 } azt; 593 + #endif /* AZT_PRIVATE_IOCTLS */ 594 int i, i1, i2, i3, j, k; 595 unsigned char sequence=0; 596 unsigned char command[80]; ··· 738 } 739 } 740 741 + int main(int argc, char *argv[]) 742 { 743 printf("\nTesting tool for a CDROM driver's audio functions V0.1\n"); 744 printf("(C) 1995 Eberhard Moenkeberg <emoenke@gwdg.de>\n"); ··· 1046 rc=ioctl(drive,CDROMAUDIOBUFSIZ,j); 1047 printf("%d frames granted.\n",rc); 1048 break; 1049 + #endif /* SBP_PRIVATE_IOCTLS */ 1050 default: 1051 printf("unknown command: \"%s\".\n",command); 1052 break; 1053 } 1054 } 1055 + return 0; 1056 } 1057 /*==========================================================================*/ 1058