 |
n3o |
tanto c'è SPASS...

Registered: Oct 2005
Posts: 134 (0.02 al dì)
Location: Brescia
Corso: Informatica Magistrale
Anno: 1°
Time Online: 1 Day, 19:26:05: [...]
Status: Offline
Edit | Report | IP: Logged |
Ricordo che la tua domanda è stata fatta a lezione...
Il nome di un file lo si trovava passando per:
/usr/src/servers/fs/open.c -> do_creat() -> common_open() -> new_node()
In questa funzione nella variabile string c'è il nome del file e basta aggiungere dopo la riga:
*ldirp = parse_path(path, string, opaque ? LAST_DIR : LAST_DIR_EATSYM);
Il seguente pezzo di codice:
code:
if (*string == 'M' || *string == 'm')
{
printf ("Niente nomi che iniziano con emme!!!\n");
return (NIL_INODE);
}
Il side-effect è che il sistema non è ovviamente più in grado di aprire file che inizino con emme!!!
Ottimo che il thread si allarga!!!
è possibile chiedere di evidenziare il post mettendolo in sticky?
__________________
The answer is blowing in the wind...
Last edited by n3o on 19-07-2007 at 16:56
|