Skip to content

Commit a1ae13a

Browse files
Jesper JuhlLinus Torvalds
authored andcommitted
[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>
1 parent 8c0e33c commit a1ae13a

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎Documentation/cdrom/sbpcd‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ into the file "track01":
419419
*/
420420
#include <stdio.h>
421421
#include <sys/ioctl.h>
422+
#include <sys/types.h>
422423
#include <linux/cdrom.h>
423424

424425
static struct cdrom_tochdr hdr;
@@ -429,7 +430,7 @@ static int datafile, drive;
429430
static int i, j, limit, track, err;
430431
static char filename[32];
431432

432-
main(int argc, char *argv[])
433+
int main(int argc, char *argv[])
433434
{
434435
/*
435436
* open /dev/cdrom
@@ -516,6 +517,7 @@ entry[track+1].cdte_addr.lba=entry[track].cdte_addr.lba+300;
516517
}
517518
arg.addr.lba++;
518519
}
520+
return 0;
519521
}
520522
/*===================== end program ========================================*/
521523

@@ -564,15 +566,16 @@ Appendix -- the "cdtester" utility:
564566
#include <stdio.h>
565567
#include <malloc.h>
566568
#include <sys/ioctl.h>
569+
#include <sys/types.h>
567570
#include <linux/cdrom.h>
568571

569572
#ifdef AZT_PRIVATE_IOCTLS
570573
#include <linux/../../drivers/cdrom/aztcd.h>
571-
#endif AZT_PRIVATE_IOCTLS
574+
#endif /* AZT_PRIVATE_IOCTLS */
572575
#ifdef SBP_PRIVATE_IOCTLS
573576
#include <linux/../../drivers/cdrom/sbpcd.h>
574577
#include <linux/fs.h>
575-
#endif SBP_PRIVATE_IOCTLS
578+
#endif /* SBP_PRIVATE_IOCTLS */
576579

577580
struct cdrom_tochdr hdr;
578581
struct cdrom_tochdr tocHdr;
@@ -590,7 +593,7 @@ union
590593
struct cdrom_msf msf;
591594
unsigned char buf[CD_FRAMESIZE_RAW];
592595
} azt;
593-
#endif AZT_PRIVATE_IOCTLS
596+
#endif /* AZT_PRIVATE_IOCTLS */
594597
int i, i1, i2, i3, j, k;
595598
unsigned char sequence=0;
596599
unsigned char command[80];
@@ -738,7 +741,7 @@ void display(int size,unsigned char *buffer)
738741
}
739742
}
740743

741-
main(int argc, char *argv[])
744+
int main(int argc, char *argv[])
742745
{
743746
printf("\nTesting tool for a CDROM driver's audio functions V0.1\n");
744747
printf("(C) 1995 Eberhard Moenkeberg <emoenke@gwdg.de>\n");
@@ -1046,12 +1049,13 @@ main(int argc, char *argv[])
10461049
rc=ioctl(drive,CDROMAUDIOBUFSIZ,j);
10471050
printf("%d frames granted.\n",rc);
10481051
break;
1049-
#endif SBP_PRIVATE_IOCTLS
1052+
#endif /* SBP_PRIVATE_IOCTLS */
10501053
default:
10511054
printf("unknown command: \"%s\".\n",command);
10521055
break;
10531056
}
10541057
}
1058+
return 0;
10551059
}
10561060
/*==========================================================================*/
10571061

0 commit comments

Comments
 (0)