Hi Vegard, On Sat, 2007-09-22 at 21:27 +0200, Vegard Nossum wrote:Good luck :-) [snip] Together with the idea of not allowing multiple lines in the kprint_xxx functions, that would go with our approach having message numbers to identify a message. Multiple lines are combined explicitly to one message. I think it is a good idea to be able to identify, which lines of a message belong together. [snip] [snip] Would be nice to have some code here. How do you want to implement that? You have to allocate / preallocate memory for the argv array. Something like: kprint_err(const char* fmt, ...) { va_list ap; struct kprint_message *msg; msg = &message_arry[current]; va_start(ap, fmt); msg->argv = kmalloc(sizeof(long) * argc, GFP_KERNEL); ... for (i = 0; i < argc, i++) { msg->argv[i] = va_arg(ap, long); } If you do it like that, you can't support "%s", since then you would store only the pointer and not the whole string. I think, that we can't live without %s. Michael -
| Linus Torvalds | Linux 2.6.27-rc8 |
| Rafael J. Wysocki | 2.6.27-rc4-git1: Reported regressions from 2.6.26 |
| David Miller | [GIT]: Networking |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Miklos Vajna | [rfc] git submodules howto |
| Catalin Marinas | Re: [StGIT PATCH] Don't use patches/<branch>/current |
| Lars Hjemli | [ANNOUNCE] cgit 0.8 |
| Junio C Hamano | Re: [RFC] introduce GIT_WORK_DIR environment variable |
| rezidue | Speed Problems |
| Chris | Prolific USB-Serial Controller |
| Richard Daemon | Nfsen and php problems...? |
| Richard Stallman | Real men don't attack straw men |
| Jarek Poplawski | [PATCH take 2] pkt_sched: Protect gen estimators under est_lock. |
| Steve Glendinning | [PATCH] SMSC LAN911x and LAN921x vendor driver |
| Arjan van de Ven | Re: [GIT]: Networking |
| Denys | r8169 crash |
