[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#4427: Followup (solution) for problem with "mt"



Package: cpio
Version: 2.4.2-7

Bug report, and a patch to fix it.

mt tell does not work on my HP DAT drive.  After investigation, it
turns out that it's because GNU mt.c uses wrong syscall.

  if (rmtioctl (desc, MTIOCTOP, &position) == -1)
    error (2, errno, "%s", dev);
  printf("At block %d.\n", position.mt_blkno);

This will not get the position.  According to "man st" this should be:

  if (rmtioctl (desc, MTIOCPOS, &position) == -1)
    error (2, errno, "%s", dev);
  printf("At block %d.\n", position.mt_blkno);

which appears to work fine.

--
Rob



Reply to: