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