2005-04-09 00:08:48

by Jesper Juhl

[permalink] [raw]
Subject: [PATCH] cosmetic fixes for example programs in Documentation/cdrom/sbpcd


Hi Andrew,

I'm sending this to you directly since Eberhard Moenkeberg already
indicated to me that he approves of the patch.

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 <[email protected]>
---

sbpcd | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)

--- linux-2.6.12-rc2-mm2-orig/Documentation/cdrom/sbpcd 2005-03-02 08:38:13.000000000 +0100
+++ linux-2.6.12-rc2-mm2/Documentation/cdrom/sbpcd 2005-04-09 02:04:11.000000000 +0200
@@ -419,6 +419,7 @@
*/
#include <stdio.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
#include <linux/cdrom.h>

static struct cdrom_tochdr hdr;
@@ -429,7 +430,7 @@
static int i, j, limit, track, err;
static char filename[32];

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
/*
* open /dev/cdrom
@@ -516,6 +517,7 @@
}
arg.addr.lba++;
}
+ return 0;
}
/*===================== end program ========================================*/

@@ -564,15 +566,16 @@
#include <stdio.h>
#include <malloc.h>
#include <sys/ioctl.h>
+#include <sys/types.h>
#include <linux/cdrom.h>

#ifdef AZT_PRIVATE_IOCTLS
#include <linux/../../drivers/cdrom/aztcd.h>
-#endif AZT_PRIVATE_IOCTLS
+#endif /* AZT_PRIVATE_IOCTLS */
#ifdef SBP_PRIVATE_IOCTLS
#include <linux/../../drivers/cdrom/sbpcd.h>
#include <linux/fs.h>
-#endif SBP_PRIVATE_IOCTLS
+#endif /* SBP_PRIVATE_IOCTLS */

struct cdrom_tochdr hdr;
struct cdrom_tochdr tocHdr;
@@ -590,7 +593,7 @@
struct cdrom_msf msf;
unsigned char buf[CD_FRAMESIZE_RAW];
} azt;
-#endif AZT_PRIVATE_IOCTLS
+#endif /* AZT_PRIVATE_IOCTLS */
int i, i1, i2, i3, j, k;
unsigned char sequence=0;
unsigned char command[80];
@@ -738,7 +741,7 @@
}
}

-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("(C) 1995 Eberhard Moenkeberg <[email protected]>\n");
@@ -1046,12 +1049,13 @@
rc=ioctl(drive,CDROMAUDIOBUFSIZ,j);
printf("%d frames granted.\n",rc);
break;
-#endif SBP_PRIVATE_IOCTLS
+#endif /* SBP_PRIVATE_IOCTLS */
default:
printf("unknown command: \"%s\".\n",command);
break;
}
}
+ return 0;
}
/*==========================================================================*/




2005-04-09 00:17:38

by Eberhard Moenkeberg

[permalink] [raw]
Subject: Re: [PATCH] cosmetic fixes for example programs in Documentation/cdrom/sbpcd

Hi,

On Sat, 9 Apr 2005, Jesper Juhl wrote:

> Hi Andrew,
>
> I'm sending this to you directly since Eberhard Moenkeberg already
> indicated to me that he approves of the patch.

Yes OK (I didn't say it yet, did I?), but I guess it is only cosmetic, as
you already said.

Cheers -e
--
Eberhard Moenkeberg ([email protected], [email protected])

2005-04-09 00:24:22

by Jesper Juhl

[permalink] [raw]
Subject: Re: [PATCH] cosmetic fixes for example programs in Documentation/cdrom/sbpcd

On Sat, 9 Apr 2005, Eberhard Moenkeberg wrote:

> Hi,
>
> On Sat, 9 Apr 2005, Jesper Juhl wrote:
>
> > Hi Andrew,
> >
> > I'm sending this to you directly since Eberhard Moenkeberg already
> > indicated to me that he approves of the patch.
>
> Yes OK (I didn't say it yet, did I?), but I guess it is only cosmetic, as you
> already said.
>
Unless I interpreted you wrong I'd say you did (in the "[PATCH] small
fixes for example programs in Documentation/cdrom/sbpcd" thread):

On Thu, 17 Mar 2005, Eberhard Moenkeberg wrote:
...
> Do it.
> I'm kind of proud, only "cosmetical" changes after a whole decennium. ;-))
>
...


--
Jesper

2005-04-09 10:26:51

by Eberhard Moenkeberg

[permalink] [raw]
Subject: Re: [PATCH] cosmetic fixes for example programs in Documentation/cdrom/sbpcd

Hi,

On Sat, 9 Apr 2005, Jesper Juhl wrote:
> On Sat, 9 Apr 2005, Eberhard Moenkeberg wrote:
>> On Sat, 9 Apr 2005, Jesper Juhl wrote:

>>> Hi Andrew,
>>>
>>> I'm sending this to you directly since Eberhard Moenkeberg already
>>> indicated to me that he approves of the patch.
>>
>> Yes OK (I didn't say it yet, did I?), but I guess it is only cosmetic, as you
>> already said.
>>
> Unless I interpreted you wrong I'd say you did (in the "[PATCH] small
> fixes for example programs in Documentation/cdrom/sbpcd" thread):
>
> On Thu, 17 Mar 2005, Eberhard Moenkeberg wrote:
> ...
>> Do it.
>> I'm kind of proud, only "cosmetical" changes after a whole decennium. ;-))
>>
> ...

Oh yes. Sorry.

Cheers -e
--
Eberhard Moenkeberg ([email protected], [email protected])