Home | History | Annotate | Download | only in eject

Lines Matching defs:dn

333 	const char *dn;
340 dn = nick2dev(name);
341 if (dn == NULL)
342 dn = name;
345 len = strlen(dn);
346 if (!isdigit((unsigned char)dn[len - 1]))
348 if (!isdigit((unsigned char)dn[len - 1]))
349 errx(1, "Can't figure out base name for dev name %s", dn);
352 if (strncmp(mounts[i].f_mntfromname, dn, len) == 0) {
374 const char *dn;
376 dn = nick2rdev(name);
377 if (dn == NULL)
378 dn = name; /* Hope for the best. */
379 fd = open(dn, O_RDONLY);
381 err(1, "open: %s", dn);
385 (void)printf("Ejecting %s...\n", dn);
390 err(1, "ioctl: MTIOCTOP: %s", dn);
410 const char *dn;
413 dn = nick2rdev(name);
414 if (dn == NULL)
415 dn = name; /* Hope for the best. */
416 fd = open(dn, O_RDONLY);
418 err(1, "open: %s", dn);
422 (void)printf("Closing %s...\n", dn);
425 err(1, "ioctl: CDIOCCLOSE: %s", dn);
429 (void)printf("Ejecting %s...\n", dn);
435 err(1, "ioctl: DIOCLOCK: %s", dn);
439 err(1, "ioctl: DIOCEJECT: %s", dn);
443 (void)printf("Locking %s...\n", dn);
447 err(1, "ioctl: DIOCLOCK: %s", dn);
451 (void)printf("Unlocking %s...\n", dn);
455 err(1, "ioctl: DIOCLOCK: %s", dn);