/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
break;
case 'V':
printf("%s version %s\n", progname, VERSION);
- break;
+ exit(0);
default:
errflg++;
}
/*
* check for a realtime partition
*/
- sprintf(tbuf,"%s",target);
+ snprintf(tbuf, sizeof(tbuf), "%s", target);
if ( stat(target, &s2) ) {
if (!S_ISDIR(s2.st_mode)) {
/* take out target file name */
if ((ptr = strrchr(tbuf, '/')) != NULL)
*ptr = '\0';
else
- sprintf(tbuf, ".");
+ snprintf(tbuf, sizeof(tbuf), ".");
}
}
/*
* check if target is a directory
*/
- sprintf(tbuf,"%s",target);
+ snprintf(tbuf, sizeof(tbuf), "%s", target);
if ( !stat(target, &s2) ) {
if (S_ISDIR(s2.st_mode)) {
- sprintf(tbuf,"%s/%s",target, basename(source));
+ snprintf(tbuf, sizeof(tbuf), "%s/%s", target,
+ basename(source));
}
}