aboutsummaryrefslogtreecommitdiff
path: root/src/libdisk
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/libdisk
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/libdisk')
-rw-r--r--src/libdisk/disk.c13
-rw-r--r--src/libdisk/proto.c4
-rw-r--r--src/libdisk/scsi.c10
3 files changed, 13 insertions, 14 deletions
diff --git a/src/libdisk/disk.c b/src/libdisk/disk.c
index 3428c467..0230d329 100644
--- a/src/libdisk/disk.c
+++ b/src/libdisk/disk.c
@@ -16,16 +16,16 @@ mkwidth(Disk *disk)
/*
* Discover the disk geometry by various sleazeful means.
- *
+ *
* First, if there is a partition table in sector 0,
* see if all the partitions have the same end head
- * and sector; if so, we'll assume that that's the
+ * and sector; if so, we'll assume that that's the
* right count.
- *
+ *
* If that fails, we'll try looking at the geometry that the ATA
* driver supplied, if any, and translate that as a
- * BIOS might.
- *
+ * BIOS might.
+ *
* If that too fails, which should only happen on a SCSI
* disk with no currently defined partitions, we'll try
* various common (h, s) pairs used by BIOSes when faking
@@ -252,7 +252,7 @@ opensd(Disk *disk)
}
}
-
+
disk->size = disk->secs * disk->secsize;
if(disk->size <= 0) {
strcpy(disk->part, "");
@@ -345,4 +345,3 @@ opendisk(char *disk, int rdonly, int noctl)
d->type = Tfile;
return openfile(d);
}
-
diff --git a/src/libdisk/proto.c b/src/libdisk/proto.c
index ee30fc92..43e3d9c4 100644
--- a/src/libdisk/proto.c
+++ b/src/libdisk/proto.c
@@ -13,7 +13,7 @@ enum {
#undef warn
#define warn protowarn
-#undef getmode
+#undef getmode
#define getmode protogetmode
typedef struct File File;
@@ -287,7 +287,7 @@ mkpath(Mkaux *mkaux, char *prefix, char *elem)
static void
setnames(Mkaux *mkaux, File *f)
{
-
+
if(f->old){
if(f->old[0] == '/')
setname(mkaux, &mkaux->oldfile, f->old, "");
diff --git a/src/libdisk/scsi.c b/src/libdisk/scsi.c
index 3f351053..b790ef3b 100644
--- a/src/libdisk/scsi.c
+++ b/src/libdisk/scsi.c
@@ -1,7 +1,7 @@
/*
* Now thread-safe.
*
- * The codeqlock guarantees that once codes != nil, that pointer will never
+ * The codeqlock guarantees that once codes != nil, that pointer will never
* change nor become invalid.
*
* The QLock in the Scsi structure moderates access to the raw device.
@@ -62,7 +62,7 @@ getcodes(void)
codes[n] = '\0';
qunlock(&codeqlock);
}
-
+
char*
scsierror(int asc, int ascq)
{
@@ -228,11 +228,11 @@ scsi(Scsi *s, uchar *cmd, int ccount, void *v, int dcount, int io)
if((n=_scsicmd(s, req, sizeof(req), sense, sizeof(sense), Sread, 0)) < 14)
if(scsiverbose)
fprint(2, "reqsense scsicmd %d: %r\n", n);
-
+
if(_scsiready(s, 0) < 0)
if(scsiverbose)
fprint(2, "unit not ready\n");
-
+
key = sense[2];
code = sense[12];
if(code == 0x17 || code == 0x18) { /* recovered errors */
@@ -319,7 +319,7 @@ openscsi(char *dev)
s->rawfd = rawfd;
s->inquire = p;
s->changetime = time(0);
-
+
if(scsiready(s) < 0)
goto Error1;