*/
static volatile void die(char *str)
{
- errorMsg("%s\n", str);
+ error_msg("%s\n", str);
exit(8);
}
int fd;
long size;
- fd = open(file, O_RDWR);
- if (fd < 0) {
- perror(file);
- exit(1);
- }
+ if ((fd = open(file, O_RDWR)) < 0)
+ perror_msg_and_die("%s", file);
if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
close(fd);
return (size * 512);
#ifdef BB_FEATURE_MINIX2
version2 = 1;
#else
- errorMsg("%s: not compiled with minix v2 support\n",
+ error_msg("%s: not compiled with minix v2 support\n",
device_name);
exit(-1);
#endif