shithub: riscv

Download patch

ref: e3a77e594f8491412d635d87fe5b4bc87f447aa5
parent: 9df9a3625ced6ec4f8c2f159903e4d0309bedb12
author: cinap_lenrek <[email protected]>
date: Thu Dec 18 21:38:36 EST 2014

sdloop: hardcode Enotup[] string to avoid devaoe dependency

--- a/sys/src/9/port/sdloop.c
+++ b/sys/src/9/port/sdloop.c
@@ -14,10 +14,7 @@
 #include "../port/netif.h"
 
 extern	char	Echange[];
-extern	char	Enotup[];
 
-#define uprint(...)	snprint(up->genbuf, sizeof up->genbuf, __VA_ARGS__);
-
 enum {
 	Maxpath		= 256,
 	Devsectsize	= 512,
@@ -302,7 +299,7 @@
 
 	if(waserror()){
 		if(strcmp(up->errstr, Echange) == 0 ||
-		    strcmp(up->errstr, Enotup) == 0)
+		    strstr(up->errstr, "device is down") != nil)
 			u->sectors = 0;
 		nexterror();
 	}