pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/easydiskpasswd update for changes in <dev/scs...
details: https://anonhg.NetBSD.org/pkgsrc/rev/28b035c7f7a5
branches: trunk
changeset: 508971:28b035c7f7a5
user: drochner <drochner%pkgsrc.org@localhost>
date: Wed Mar 01 17:16:01 2006 +0000
description:
update for changes in <dev/scsipi/scsi*.h> headers in NetBSD-3 and later;
now this is for NetBSD>=3 only (until the next header change...), but
as I'm appearently the only person who has bought that crap I don't
feel bad about it
diffstat:
sysutils/easydiskpasswd/Makefile | 7 ++++---
sysutils/easydiskpasswd/files/easydiskpasswd.c | 14 +++++++-------
2 files changed, 11 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r e5b9f9a575a4 -r 28b035c7f7a5 sysutils/easydiskpasswd/Makefile
--- a/sysutils/easydiskpasswd/Makefile Wed Mar 01 16:54:46 2006 +0000
+++ b/sysutils/easydiskpasswd/Makefile Wed Mar 01 17:16:01 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2006/01/04 04:29:08 schmonz Exp $
+# $NetBSD: Makefile,v 1.9 2006/03/01 17:16:01 drochner Exp $
DISTNAME= easydiskpasswd-1.0
CATEGORIES= sysutils
@@ -12,8 +12,9 @@
WRKSRC= ${WRKDIR}
NO_CHECKSUM= yes
-# we depend on SCIOCCOMMAND and the "make" infrastructure
-ONLY_FOR_PLATFORM= NetBSD-*-*
+# we depend on SCIOCCOMMAND, a header defining sense codes
+# and the "make" infrastructure
+ONLY_FOR_PLATFORM= NetBSD-[3-9]*-*
do-extract:
${CP} ${FILESDIR}/easydiskpasswd.c ${FILESDIR}/Makefile ${WRKSRC}
diff -r e5b9f9a575a4 -r 28b035c7f7a5 sysutils/easydiskpasswd/files/easydiskpasswd.c
--- a/sysutils/easydiskpasswd/files/easydiskpasswd.c Wed Mar 01 16:54:46 2006 +0000
+++ b/sysutils/easydiskpasswd/files/easydiskpasswd.c Wed Mar 01 17:16:01 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: easydiskpasswd.c,v 1.1.1.1 2002/09/19 20:56:57 drochner Exp $ */
+/* $NetBSD: easydiskpasswd.c,v 1.2 2006/03/01 17:16:01 drochner Exp $ */
/*
* Copyright (c) 2002
* Matthias Drochner. All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/scsiio.h>
-#include <dev/scsipi/scsipi_all.h>
+#include <dev/scsipi/scsi_spc.h>
#include <util.h>
#include <string.h>
#include <fcntl.h>
@@ -106,7 +106,7 @@
char pathbuf[MAXPATHLEN];
const char *passwd = 0;
struct scsireq cmd;
- struct scsipi_sense_data *sd;
+ struct scsi_sense_data *sd;
while ((ch = getopt(argc, argv, "dp:")) != -1)
switch (ch) {
@@ -158,11 +158,11 @@
err(2, "SCIOCCOMMAND");
if (cmd.retsts == SCCMD_SENSE) {
- sd = (struct scsipi_sense_data *)&cmd.sense;
- if ((sd->flags & SSD_KEY) == SKEY_ILLEGAL_REQUEST) {
- if (sd->add_sense_code == 0x24)
+ sd = (struct scsi_sense_data *)&cmd.sense;
+ if (SSD_SENSE_KEY(sd->flags) == SKEY_ILLEGAL_REQUEST) {
+ if (sd->asc == 0x24)
errx(3, "wrong password");
- if (sd->add_sense_code == 0x20) {
+ if (sd->asc == 0x20) {
/* XXX shouldn't get here (caught above) */
warnx("no password set");
exit (0);
Home |
Main Index |
Thread Index |
Old Index