Package: avra
Version: 1.0.1-0.1
Severity: normal
Tags: patch
avra exits with status 0 (EXIT_SUCCESS), even when errors occur. This
makes it essentially unusable in a Makefile.
I've attached a patch that fixes the problem.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.12.6-xen-skas3-v9-pre7-skas3-v9-pre7
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_CA.UTF-8)
Versions of packages avra depends on:
ii libc6 2.3.6-7 GNU C Library: Shared libraries
-- no debconf information
--
Dwayne C. Litzenberger <[EMAIL PROTECTED]>
diff -ru l/avra-1.0.1/SOURCE/avra.c avra-1.0.1/SOURCE/avra.c
--- l/avra-1.0.1/SOURCE/avra.c 2004-05-09 09:57:02.000000000 -0600
+++ avra-1.0.1/SOURCE/avra.c 2006-05-25 21:39:04.000000000 -0600
@@ -82,6 +82,7 @@
int main(int argc, char *argv[])
{
int show_usage = False;
+ int exit_status = EXIT_FAILURE;
struct prog_info *pi;
struct args *args;
unsigned char c;
@@ -123,16 +124,21 @@
if(pi) {
get_rootpath(pi, args); /* get assembly root path */
assemble(pi); /* the main assembly routine
*/
+ if (pi->error_count == 0)
+ exit_status = EXIT_SUCCESS;
free_pi(pi); /* free all allocated memory
*/
}
}
else {
list_devices(); /* list all supported devices */
+ exit_status = EXIT_SUCCESS;
}
}
}
- else
+ else {
show_usage = True;
+ exit_status = EXIT_SUCCESS;
+ }
}
free_args(args);
}
@@ -143,7 +149,7 @@
if(show_usage) {
printf("%s", usage);
}
- exit(EXIT_SUCCESS);
+ exit(exit_status);
return (0); /* compiler warning, JEG 4-23-03 */
}