I'm guessing you mean that the user is calling read once (and not a
second time to get the 0/eof return), and that proc_file_read() is
calling your read_proc twice. If that's the case, you can just set
the eof flag on the first call (on which you return the data), and
you won't be called again unless the user reads again.
And of course, as David Miller suggests, you can check the offset
first, before generating data.
-- /Jonathan Lundell. - 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/