Re: How to check if a file is a present in a directory(directly/indirectly)

2015-03-06 Thread Gabriel Duarte
Maybe it helps:
http://stackoverflow.com/questions/8347553/how-do-i-open-a-directory-at-kernel-level-using-the-file-descriptor-for-that-dir

2015-03-06 12:08 GMT-03:00 noyb noybee afzal...@gmail.com:

 I am building a LKM in which I need to check whether a file is inside
 a particular directory(directly or inside sub-directories). Is there a
 function for this? Do I need to use the lookup function in
 inode_operations for this or is there a better method?

 Regards,
 winged_elite

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-- 
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Translate keysyms to ASCII

2012-03-30 Thread Gabriel Duarte
Anyway, does not work...
I just would like to know if the kernel offers me a conversion table. As I
said, I did it already by myself, but was just looking for a more stylish
way to do...

On Thu, Mar 29, 2012 at 7:42 PM, Jeff Haran jha...@bytemobile.com wrote:

 From: kernelnewbies-boun...@kernelnewbies.org [mailto:
 kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Gabriel Duarte
 Sent: Thursday, March 29, 2012 4:14 AM
 To: kernelnewbies@kernelnewbies.org
 Subject: Translate keysyms to ASCII

 Hello people,


 I working on a small proof of concept keylogger that works on kernel mode.
 It's parte of my studies of kernel development.
 I'm using the struct keyboard_notifier_param to get the keys pressed on
 the keyboard(s) attached to the system.

 At the end, I print the value, like this:

 printk(KERN_DEBUG KEY== %i, param-value);


 According to the definition of the struct keyboard_notifier_param at
 http://lxr.free-electrons.com/source/include/linux/keyboard.h#L37, the
 field value is a  keycode, unicode value or keysym.

 For example, when I press the key a, I get the value 30, but I would like
 tranlate it to the ASCII. I managed to create a translation table by
 myself, but I think there is another way more stylish to do this, or not? I
 googled a lot but could not find a consistent answer.

 Any help is appreciated,

 Gabriel.

 --
 Gabriel Duarte
 Linux User #471185
 France / Grenoble - Rhône Alpes
 http://genericdev.wordpress.com/

 The term I think you want to search for is PC keyboard scan code. This
 link seems to cover it pretty well:

 http://www.quadibloc.com/comp/scan.htm

 Jeff Haran





-- 
Gabriel Duarte
Linux User #471185
France / Grenoble - Rhône Alpes
http://genericdev.wordpress.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies