ref: 3bba12aa3264c7aa3de9e33052580bc02e191037
parent: e1548dc55a3459a7b746ec6734e0b5e16d0fbf8a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 9 07:44:48 EST 2025
cifs: don't put newline in sysfatal() or werrstr()
--- a/sys/src/cmd/cifs/cifs.c
+++ b/sys/src/cmd/cifs/cifs.c
@@ -161,7 +161,7 @@
qunlock(&p->s->rpclock);
if(got < 32+NBHDRLEN){
- werrstr("cifs packet too small (%d < %d)\n", got, 32+NBHDRLEN);
+ werrstr("cifs packet too small (%d < %d)", got, 32+NBHDRLEN);
return -1;
}
@@ -348,7 +348,7 @@
for(q = Sess->auth->resp[0]; *q; ){
q += chartorune(&r, q);
if(r > Bits16)
- sysfatal("CIFSsession: '%C' utf too wide for windows\n", r);
+ sysfatal("CIFSsession: '%C' utf too wide for windows", r);
pl16(p, toupperrune(r));
}
pl16(p, 0);
@@ -356,7 +356,7 @@
for(q = Sess->auth->resp[0]; *q; ){
q += chartorune(&r, q);
if(r > Bits16)
- sysfatal("CIFSsession: '%C' utf too wide for windows\n", r);
+ sysfatal("CIFSsession: '%C' utf too wide for windows", r);
pl16(p, r);
}
pl16(p, 0);
--- a/sys/src/cmd/cifs/main.c
+++ b/sys/src/cmd/cifs/main.c
@@ -1258,10 +1258,10 @@
(Sess = cifsdial(Host, "*SMBSERVER", sysname)) != nil)
goto connected;
- sysfatal("%s - cannot dial, %r\n", Host);
+ sysfatal("%s - cannot dial, %r", Host);
connected:
if(CIFSnegotiate(Sess, &svrtime, windom, sizeof windom, cname, sizeof cname) == -1)
- sysfatal("%s - cannot negioate common protocol, %r\n", Host);
+ sysfatal("%s - cannot negioate common protocol, %r", Host);
#ifndef DEBUG_MAC
Sess->secmode &= ~SECMODE_SIGN_ENABLED;
@@ -1274,7 +1274,7 @@
Sess->challen);
if(CIFSsession(Sess) < 0)
- sysfatal("session authentication failed, %r\n");
+ sysfatal("session authentication failed, %r");
Sess->slip = svrtime - time(nil);
Sess->cname = estrdup9p(cname);
--- a/sys/src/cmd/cifs/pack.c
+++ b/sys/src/cmd/cifs/pack.c
@@ -33,7 +33,7 @@
while(*str){
str += chartorune(&r, str);
if(r > Bits16)
- sysfatal("ppath: %C/%x utf too wide for windows\n", r, r);
+ sysfatal("ppath: %C/%x utf too wide for windows", r, r);
if(r == L'/')
r = L'\\';
pl16(p, r);
@@ -65,7 +65,7 @@
while(*str){
str += chartorune(&r, str);
if(r > Bits16)
- sysfatal("pstr: %C/%x utf too wide for windows\n", r, r);
+ sysfatal("pstr: %C/%x utf too wide for windows", r, r);
pl16(p, r);
}
pl16(p, 0);
--
⑨