aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/sam/unix.c
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
commit02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch)
treef053238978479e408a2b83571443e132f30586ab /src/cmd/sam/unix.c
parentc0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff)
parent3d1382b98a502d0c34d5ba2c462396acc515016e (diff)
downloadplan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/sam/unix.c')
-rw-r--r--src/cmd/sam/unix.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c
index a745a5bc..97f2fce8 100644
--- a/src/cmd/sam/unix.c
+++ b/src/cmd/sam/unix.c
@@ -10,7 +10,7 @@
#include "sam.h"
Rune samname[] = { '~', '~', 's', 'a', 'm', '~', '~', 0 };
-
+
static Rune l1[] = { '{', '[', '(', '<', 0253, 0};
static Rune l2[] = { '\n', 0};
static Rune l3[] = { '\'', '"', '`', 0};
@@ -85,15 +85,15 @@ getuser(void)
return user;
}
-int
-statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly)
+int
+statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly)
{
struct stat dirb;
if (stat(name, &dirb) == -1)
return -1;
if (dev)
- *dev = dirb.st_dev;
+ *dev = dirb.st_dev;
if (id)
*id = dirb.st_ino;
if (time)
@@ -110,11 +110,11 @@ statfd(int fd, ulong *dev, uvlong *id, long *time, long *length, long *appendonl
{
struct stat dirb;
- if (fstat(fd, &dirb) == -1)
+ if (fstat(fd, &dirb) == -1)
return -1;
if (dev)
*dev = dirb.st_dev;
- if (id)
+ if (id)
*id = dirb.st_ino;
if (time)
*time = dirb.st_mtime;
@@ -174,11 +174,11 @@ tempdisk(void)
int fd = temp_file(buf, sizeof buf);
if (fd >= 0)
remove(buf);
- return fd;
+ return fd;
}
#undef waitfor
-int
+int
samwaitfor(int pid)
{
int r;
@@ -218,5 +218,3 @@ erealloc(void *p, ulong n)
panic("realloc fails");
return p;
}
-
-