sdloop: hardcode Enotup[] string to avoid devaoe dependency
This commit is contained in:
parent
9df9a3625c
commit
e3a77e594f
|
@ -14,9 +14,6 @@
|
||||||
#include "../port/netif.h"
|
#include "../port/netif.h"
|
||||||
|
|
||||||
extern char Echange[];
|
extern char Echange[];
|
||||||
extern char Enotup[];
|
|
||||||
|
|
||||||
#define uprint(...) snprint(up->genbuf, sizeof up->genbuf, __VA_ARGS__);
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Maxpath = 256,
|
Maxpath = 256,
|
||||||
|
@ -302,7 +299,7 @@ loopbio(SDunit *u, int, int write, void *a, long count, uvlong lba)
|
||||||
|
|
||||||
if(waserror()){
|
if(waserror()){
|
||||||
if(strcmp(up->errstr, Echange) == 0 ||
|
if(strcmp(up->errstr, Echange) == 0 ||
|
||||||
strcmp(up->errstr, Enotup) == 0)
|
strstr(up->errstr, "device is down") != nil)
|
||||||
u->sectors = 0;
|
u->sectors = 0;
|
||||||
nexterror();
|
nexterror();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue