Permalink
Browse files

vtllib: set partition in resp_read_position

Set partition in resp_read_position.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Mark Harvey <markh794@gmail.com>
  • Loading branch information...
Sebastian Herbszt authored and markh794 committed Apr 1, 2013
1 parent 40c51ba commit 0fdb8464220246e09c97bdff01c1b947ea3b0fa2
Showing with 3 additions and 0 deletions.
  1. +3 −0 usr/vtllib.c
View
@@ -267,6 +267,8 @@ int resp_read_position_long(loff_t pos, uint8_t *buf, uint8_t *sam_stat)
/* Return tape position - short format */
int resp_read_position(loff_t pos, uint8_t *buf, uint8_t *sam_stat)
{
+ uint8_t partition = 0;
+
memset(buf, 0, READ_POSITION_LEN); /* Clear 'array' */
if ((pos == 0) || (pos == 1))
@@ -276,6 +278,7 @@ int resp_read_position(loff_t pos, uint8_t *buf, uint8_t *sam_stat)
/* FIXME: Need to update EOP & BPEW bits too */
+ buf[1] = partition;
put_unaligned_be32(pos, &buf[4]);
put_unaligned_be32(pos, &buf[8]);
MHVTL_DBG(1, "Positioned at block %ld", (long)pos);

0 comments on commit 0fdb846

Please sign in to comment.