rem: if (ioctl(fd, B_GET_MEDIA_STATUS, &devstatus) < 0) {
add: if (ioctl(fd, B_GET_MEDIA_STATUS, &devstatus, sizeof(devstatus)) < 0) {
context: static int do_eject(char operation, char *device){	int fd;	status_t devstatus;	fd = open(device, O_RDONLY);	if (fd < 0) {		perror(device);		return 1;	}	switch (operation) {	case 'h':		return usage("eject");	case 'e':		if (ioctl(fd, B_EJECT_DEVICE) < 0) {			perror(device);			return 1;		}		break;	case 'l':		if (ioctl(fd, B_LOAD_MEDIA) < 0) {			perror(device);			return 1;		}		break;	case 'q':		if (ioctl(fd, B_GET_MEDIA_STATUS, &devstatus) < 0) {			perror(device);			return 1;		}		switch (devstatus) {		case B_NO_ERROR:			puts("Media present");			break;		default:			puts(strerror(devstatus));		}		break;	case 's':		if (ioctl(fd, B_GET_MEDIA_STATUS, &devstatus) < 0) {			perror(device);			return 1;		}		switch (devstatus) {		case B_NO_ERROR:		case B_DEV_NO_MEDIA:			if (ioctl(fd, B_EJECT_DEVICE) < 0) {				perror(device);				return 1;			}			break;		case B_DEV_DOOR_OPEN:			if (ioctl(fd, B_LOAD_MEDIA) < 0) {				perror(device);				return 1;			}			break;		default:			perror(device);		}		break;	default:		usage("eject");		return 1;	}	close(fd);	return 0;}