diff options
author | dzwdz | 2023-01-25 20:16:22 +0100 |
---|---|---|
committer | dzwdz | 2023-01-25 20:16:22 +0100 |
commit | 17bfb0ef0a48330b1d54e61fe3c30d83528d2d90 (patch) | |
tree | b3d4aed1f408edcb17fe5c86fccaeacaa2a5a48a /src/user/app/netstack/arp.c | |
parent | 2ad6ee8ed15d1bf898645a16dbc06991a3c1425e (diff) |
style: typedef structs, shorter namespaces
I've wanted to do this for a while, and since I've just had a relatively
large refactor commit (pcpy), this is as good of a time as any.
Typedefing structs was mostly inspired by Plan 9's coding style. It makes
some lines of code much shorter at basically no expense.
Everything related to userland kept old-style struct definitions, so as not
to force that style onto other people.
I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase,
but I didn't, just in case that'd be confusing.
Diffstat (limited to 'src/user/app/netstack/arp.c')
-rw-r--r-- | src/user/app/netstack/arp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/user/app/netstack/arp.c b/src/user/app/netstack/arp.c index 6c230b3..3a1c8da 100644 --- a/src/user/app/netstack/arp.c +++ b/src/user/app/netstack/arp.c @@ -107,7 +107,7 @@ int arpcache_get(uint32_t ip, mac_t *mac) { return -1; } -void arp_fsread(handle_t h, long offset) { +void arp_fsread(hid_t h, long offset) { const char *fmt = "%08x\t%02x:%02x:%02x:%02x:%02x:%02x\n"; long linelen = snprintf(NULL, 0, fmt, 0, 1, 2, 3, 4, 5, 6) + 1; char buf[28]; @@ -129,10 +129,10 @@ void arp_fsread(handle_t h, long offset) { cur->mac[3], cur->mac[4], cur->mac[5]); - _syscall_fs_respond(h, buf + offset, linelen - offset, 0); + _sys_fs_respond(h, buf + offset, linelen - offset, 0); return; err: - _syscall_fs_respond(h, NULL, -1, 0); + _sys_fs_respond(h, NULL, -1, 0); } long arp_fswrite(const char *buf, long len, long offset) { |