procfs question
- From: yenganti pradeep <pradeepls143@xxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 16:34:49 +0100 (BST)
Hi,
I've created a new entry under /proc, to make tests.
I've defined an static int var=0;
Then I link my proc entry read function to a function
that only performs this:
int length;
length=sprintf(page,"Value %d",var++);
return length;
But when I cat/vi the file continuosly I get:
Value 0
Value 3
Value 6
etc...
Why is this three numbers increment?
Thanks
Pradeep
__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: procfs question
- From: Paulo Marques
- Re: procfs question
- From: Phillip Susi
- Re: procfs question
- Prev by Date: stealth firewall problem
- Next by Date: realtime-preempt 2.6.16-rt7-10 bug?
- Previous by thread: stealth firewall problem
- Next by thread: Re: procfs question
- Index(es):
Relevant Pages
- Re: procfs question
... yenganti pradeep wrote: ... I've defined an static int var=0; ...
Then I link my proc entry read function to a function ... Just do a 'strace' on 'cat'
to see what 'cat' really does. ... (Linux-Kernel) - Re: [patch 3/3] ext2: use perform_write aop
... Generic "read page" function for block devices that have the normal ... More
majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ
at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: hello world module
... * hello_init - the init function, called when the module is loaded. ... static
int hello_init ... To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: non conformance?
... static int i; ... If the object has external linkage, then there might
be some other TU ... present, then you violate another rule of the standard, the One ...
a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq ... (comp.lang.c) - [CFT 16/29] Add i2c_bus_type probe and remove methods
... static int i2c_device_probe(struct device *dev) ... More majordomo
info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/
... (Linux-Kernel)