neaten up some code
This commit is contained in:
parent
557cd0852e
commit
5a8a11c88d
@ -74,7 +74,7 @@ DIRS += proc/
|
|||||||
proc/$(ANAME): $(LIBOBJ)
|
proc/$(ANAME): $(LIBOBJ)
|
||||||
$(AR) rcs $@ $^
|
$(AR) rcs $@ $^
|
||||||
|
|
||||||
#proc/$(SONAME): proc/library.map
|
proc/$(SONAME): proc/library.map
|
||||||
proc/$(SONAME): $(LIBOBJ)
|
proc/$(SONAME): $(LIBOBJ)
|
||||||
$(CC) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc
|
$(CC) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc
|
||||||
|
|
||||||
|
@ -42,8 +42,9 @@ char *user_from_uid(uid_t uid)
|
|||||||
}
|
}
|
||||||
*p = (struct pwbuf *) xmalloc(sizeof(struct pwbuf));
|
*p = (struct pwbuf *) xmalloc(sizeof(struct pwbuf));
|
||||||
(*p)->uid = uid;
|
(*p)->uid = uid;
|
||||||
if ((pw = getpwuid(uid)) == NULL)
|
pw = getpwuid(uid);
|
||||||
sprintf((*p)->name, "#%d", uid);
|
if (!pw)
|
||||||
|
sprintf((*p)->name, "%d", uid);
|
||||||
else
|
else
|
||||||
sprintf((*p)->name, "%-." NAMELENGTH "s", pw->pw_name);
|
sprintf((*p)->name, "%-." NAMELENGTH "s", pw->pw_name);
|
||||||
(*p)->next = NULL;
|
(*p)->next = NULL;
|
||||||
@ -69,8 +70,9 @@ char *group_from_gid(gid_t gid)
|
|||||||
}
|
}
|
||||||
*g = (struct grpbuf *) malloc(sizeof(struct grpbuf));
|
*g = (struct grpbuf *) malloc(sizeof(struct grpbuf));
|
||||||
(*g)->gid = gid;
|
(*g)->gid = gid;
|
||||||
if ((gr = getgrgid(gid)) == NULL)
|
gr = getgrgid(gid);
|
||||||
sprintf((*g)->name, "#%d", gid);
|
if (!gr)
|
||||||
|
sprintf((*g)->name, "%d", gid);
|
||||||
else
|
else
|
||||||
sprintf((*g)->name, "%-." NAMELENGTH "s", gr->gr_name);
|
sprintf((*g)->name, "%-." NAMELENGTH "s", gr->gr_name);
|
||||||
(*g)->next = NULL;
|
(*g)->next = NULL;
|
||||||
|
@ -10,9 +10,12 @@ net/ipv4/conf/all/accept_redirects=0
|
|||||||
net/ipv4/conf/all/accept_source_route=0
|
net/ipv4/conf/all/accept_source_route=0
|
||||||
net/ipv4/icmp_echo_ignore_broadcasts =1
|
net/ipv4/icmp_echo_ignore_broadcasts =1
|
||||||
#net/ipv4/ip_forward=1
|
#net/ipv4/ip_forward=1
|
||||||
#net.ipv4.tcp_ecn = 0
|
|
||||||
#net.ipv4.ip_local_port_range = 32768 61000
|
#net.ipv4.ip_local_port_range = 32768 61000
|
||||||
|
|
||||||
|
# Broken routers will corrupt the window scaling and ECN
|
||||||
|
#net.ipv4.tcp_default_win_scale = 0
|
||||||
|
#net.ipv4.tcp_ecn = 0
|
||||||
|
|
||||||
#vm.vfs_cache_pressure = 100
|
#vm.vfs_cache_pressure = 100
|
||||||
#vm.laptop_mode = 0
|
#vm.laptop_mode = 0
|
||||||
#vm.swappiness = 60
|
#vm.swappiness = 60
|
||||||
|
Loading…
Reference in New Issue
Block a user