[Debburn-changes] r484 - in cdrkit/trunk: libusal wodim

Eduard Bloch blade at alioth.debian.org
Sun Nov 26 00:57:19 CET 2006


Author: blade
Date: 2006-11-26 00:57:19 +0100 (Sun, 26 Nov 2006)
New Revision: 484

Modified:
   cdrkit/trunk/libusal/scsitransp.c
   cdrkit/trunk/wodim/scsi_cdr.c
   cdrkit/trunk/wodim/wodim.c
Log:
Supressed some more acceptable warnings in low-verbosity mode

Modified: cdrkit/trunk/libusal/scsitransp.c
===================================================================
--- cdrkit/trunk/libusal/scsitransp.c	2006-11-25 23:25:24 UTC (rev 483)
+++ cdrkit/trunk/libusal/scsitransp.c	2006-11-25 23:57:19 UTC (rev 484)
@@ -67,7 +67,7 @@
  *	string is related to a modified source.
  */
 static	char	_usal_version[]		= CDRKIT_VERSION;	/* The global libusal version	*/
-static	char	_usal_auth_cdrkit[]	= "Cdrkit maintainers";	/* The author for this module	*/
+static	char	_usal_auth_cdrkit[]	= "Cdrkit";	/* The author for this module	*/
 
 #define	DEFTIMEOUT	20	/* Default timeout for SCSI command transport */
 

Modified: cdrkit/trunk/wodim/scsi_cdr.c
===================================================================
--- cdrkit/trunk/wodim/scsi_cdr.c	2006-11-25 23:25:24 UTC (rev 483)
+++ cdrkit/trunk/wodim/scsi_cdr.c	2006-11-25 23:57:19 UTC (rev 484)
@@ -525,7 +525,8 @@
 
 	usalp->cmdname = "set streaming";
 
-	printf("scsi_set_streaming\n");
+  if(usalp->verbose) 
+     fprintf(stderr, "scsi_set_streaming\n");
 	if (usal_cmd(usalp) < 0)
 		return (-1);
 	return (0);

Modified: cdrkit/trunk/wodim/wodim.c
===================================================================
--- cdrkit/trunk/wodim/wodim.c	2006-11-25 23:25:24 UTC (rev 483)
+++ cdrkit/trunk/wodim/wodim.c	2006-11-25 23:57:19 UTC (rev 484)
@@ -355,8 +355,9 @@
 		 * XXX mlockall() needs root privilleges.
 		 */
 		if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
-			errmsg("WARNING: Cannot do mlockall(2).\n");
-			errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n");
+       if(lverbose>2)
+          fprintf(stderr,
+                "W: Cannot do mlockall(2). Possibly increased risk for buffer underruns.\n");
 		}
 #endif
 
@@ -458,7 +459,7 @@
 
 #ifdef __linux__
 	/* get the rawio capability */
-  if (get_cap(CAP_SYS_RAWIO) && (debug || lverbose)) 
+  if (get_cap(CAP_SYS_RAWIO) && (debug || lverbose>2)) 
   {
 		perror("Warning: Cannot gain SYS_RAWIO capability");
     fprintf(stderr, "Possible reason: wodim not installed SUID root.\n");
@@ -988,7 +989,7 @@
 				comerr("Panic cannot set back effective uid.\n");
 		}
 #ifdef __linux__
-		if (get_cap(CAP_SYS_RAWIO) && (debug || lverbose))
+		if (get_cap(CAP_SYS_RAWIO) && (debug || lverbose>2))
 			perror("Error: Cannot gain SYS_RAWIO capability, is wodim installed SUID root? Reason");
 #endif
 
@@ -4224,7 +4225,8 @@
 	fillbytes(&scp, sizeof (scp), '\0');
 	scp.sched_priority = sched_get_priority_max(SCHED_RR) - pri;
 	if (sched_setscheduler(0, SCHED_RR, &scp) < 0) {
-		errmsg("WARNING: Cannot set RR-scheduler\n");
+		if(lverbose>2)
+       errmsg("WARNING: Cannot set RR-scheduler\n");
 		return (-1);
 	}
 	return (0);
@@ -4265,7 +4267,8 @@
 
 	/* set priority class */
 	if (SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS) == FALSE) {
-		errmsgno(EX_BAD, "No realtime priority class possible.\n");
+		if(debug || lverbose>2)
+       errmsgno(EX_BAD, "No realtime priority class possible.\n");
 		return (-1);
 	}
 
@@ -4299,8 +4302,10 @@
 #if	defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS)
 
 	if (setpriority(PRIO_PROCESS, getpid(), -20 + pri) < 0) {
-		errmsg("WARNING: Cannot set priority using setpriority().\n");
-		errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n");
+		if(debug || lverbose>2)
+       fprintf(stderr,
+             "WARNING: Cannot set priority using setpriority(),"
+             "increased risk for buffer underruns.\n");
 	}
 #else
 #ifdef	HAVE_DOSSETPRIORITY	/* RT priority on OS/2 */




More information about the Debburn-changes mailing list