Source-Changes-HG archive

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

[src/trunk]: src/bin/mt from Mason Loring Bliss: support "asf 0"



details:   https://anonhg.NetBSD.org/src/rev/d70433d5a795
branches:  trunk
changeset: 503788:d70433d5a795
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 13 16:07:59 2001 +0000

description:
from Mason Loring Bliss: support "asf 0"

diffstat:

 bin/mt/mt.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r e4b7611a8c3d -r d70433d5a795 bin/mt/mt.c
--- a/bin/mt/mt.c       Tue Feb 13 15:54:33 2001 +0000
+++ b/bin/mt/mt.c       Tue Feb 13 16:07:59 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mt.c,v 1.32 1999/09/07 13:56:53 simonb Exp $   */
+/*     $NetBSD: mt.c,v 1.33 2001/02/13 16:07:59 christos Exp $ */
 
 /*
  * Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)mt.c       8.2 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: mt.c,v 1.32 1999/09/07 13:56:53 simonb Exp $");
+__RCSID("$NetBSD: mt.c,v 1.33 2001/02/13 16:07:59 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -79,7 +79,7 @@
 };
 
 const struct commands com[] = {
-       { "asf",        MTIOCTOP,     MTASF,      1,  1 },
+       { "asf",        MTIOCTOP,     MTASF,      1,  0 },
        { "blocksize",  MTIOCTOP,     MTSETBSIZ,  1,  0 },
        { "bsf",        MTIOCTOP,     MTBSF,      1,  1 },
        { "bsr",        MTIOCTOP,     MTBSR,      1,  1 },
@@ -176,11 +176,12 @@
                        if (ioctl(mtfd, MTIOCTOP, &mt_com) < 0)
                                err(2, "%s", tape);
                
-                       mt_com.mt_op = MTFSF;
-                       mt_com.mt_count = count;
-                       if (ioctl(mtfd, MTIOCTOP, &mt_com) < 0)
-                               err(2, "%s", tape);
-
+                       if (count > 0) {
+                               mt_com.mt_op = MTFSF;
+                                   mt_com.mt_count = count;
+                               if (ioctl(mtfd, MTIOCTOP, &mt_com) < 0)
+                                   err(2, "%s", tape);
+                       }
                } else {
                        mt_com.mt_op = comp->c_code;
                        mt_com.mt_count = count;



Home | Main Index | Thread Index | Old Index