runtime·memmove((void*)file, (void*)"/env/", 5);
runtime·memmove((void*)(file+5), (void*)s, len);
- fd = runtime·open(file, OREAD);
+ fd = runtime·open((int8*)file, OREAD, 0);
if(fd < 0)
return nil;
n = runtime·seek(fd, 0, 2);
// license that can be found in the LICENSE file.
// Plan 9-specific system calls
-int32 runtime·open(uint8 *file, int32 mode);
int32 runtime·pread(int32 fd, void *buf, int32 nbytes, int64 offset);
int32 runtime·pwrite(int32 fd, void *buf, int32 nbytes, int64 offset);
-int32 runtime·read(int32 fd, void *buf, int32 nbytes);
int64 runtime·seek(int32 fd, int64 offset, int32 whence);
-int32 runtime·close(int32 fd);
void runtime·exits(int8* msg);
intptr runtime·brk_(void*);
int32 runtime·sleep(int32 ms);
int32 fd, i, n, ncpu;
byte buf[2048];
- fd = runtime·open((byte*)"/dev/sysstat", OREAD);
+ fd = runtime·open("/dev/sysstat", OREAD, 0);
if(fd < 0)
return 1;
ncpu = 0;
int32 fd;
runtime·memclr(b, sizeof(b));
- fd = runtime·open((byte*)"#c/pid", 0);
+ fd = runtime·open("#c/pid", 0, 0);
if(fd >= 0) {
runtime·read(fd, b, sizeof(b));
runtime·close(fd);
runtime·notify(runtime·sigtramp);
}
+void
+runtime·get_random_data(byte **rnd, int32 *rnd_len)
+{
+ *rnd = nil;
+ *rnd_len = 0;
+}
+
void
runtime·goenvs(void)
{
p--;
runtime·memmove((void*)p, (void*)"/note", 5);
- fd = runtime·open(buf, OWRITE);
+ fd = runtime·open((int8*)buf, OWRITE, 0);
if(fd < 0)
return -1;