mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
sam: report close error
This commit is contained in:
parent
0b349f6f34
commit
a1ead676e6
3 changed files with 9 additions and 1 deletions
|
@ -166,7 +166,7 @@ writeio(File *f)
|
|||
void
|
||||
closeio(Posn p)
|
||||
{
|
||||
close(io);
|
||||
Close(io);
|
||||
io = 0;
|
||||
if(p >= 0)
|
||||
dprint("#%lud\n", p);
|
||||
|
|
|
@ -237,6 +237,7 @@ int Read(int, void*, int);
|
|||
void Seek(int, long, int);
|
||||
int plan9(File*, int, String*, int);
|
||||
int Write(int, void*, int);
|
||||
void Close(int);
|
||||
int bexecute(File*, Posn);
|
||||
void cd(String*);
|
||||
void closefiles(File*, String*);
|
||||
|
|
|
@ -58,3 +58,10 @@ Seek(int f, long n, int w)
|
|||
if(seek(f, n, w)==-1)
|
||||
syserror("seek");
|
||||
}
|
||||
|
||||
void
|
||||
Close(int f)
|
||||
{
|
||||
if(close(f) < 0)
|
||||
syserror("close");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue