setmalloctag

This commit is contained in:
Russ Cox
2006-05-21 23:32:55 +00:00
parent 1125f094ce
commit 083b5a0e40
4 changed files with 37 additions and 1 deletions

View File

@ -464,6 +464,7 @@ enum{
Qrandom,
Qreboot,
Qsecstore,
Qshowfile,
Qsnarf,
Qswap,
Qsysname,
@ -497,6 +498,7 @@ static Dirtab consdir[]={
"random", {Qrandom}, 0, 0444,
"reboot", {Qreboot}, 0, 0664,
"secstore", {Qsecstore}, 0, 0666,
"showfile", {Qshowfile}, 0, 0220,
"snarf", {Qsnarf}, 0, 0666,
"swap", {Qswap}, 0, 0664,
"sysname", {Qsysname}, 0, 0664,
@ -915,6 +917,9 @@ conswrite(Chan *c, void *va, long n, vlong off)
memmove(secstorebuf+offset, va, n);
return n;
case Qshowfile:
return showfilewrite(a, n);
case Qsnarf:
if(offset >= SnarfSize || offset+n >= SnarfSize)
error(Etoobig);