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

From: Rob Browning <[email-masked]>
Date: 07 Sep 1996 00:01:49 -0500

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