find examples of multiline idioms in Linux drivers source code

ack --cc -i -A4 wait_event linux/drivers | less -i # / list_empty
The Linux Cross Referencer is nice: https://elixir.bootlin.com/linux/latest/source but when you want to find an example usage of an idiom across multiple lines, piping the ack-grep output to less is quicker. The --cc limits the search to C code, -i to ignore case, -A4 because most wait_event variants have 4 arguments that may be on lines after the function name. Use --make to search makefiles
Sample Output
--
drivers/char/ipmi/ipmb_dev_int.c:92:            ret = wait_event_interruptible(ipmb_dev->wait_queue,
drivers/char/ipmi/ipmb_dev_int.c-93-                            !list_empty(&ipmb_dev->request_queue));
drivers/char/ipmi/ipmb_dev_int.c-94-            if (ret)
drivers/char/ipmi/ipmb_dev_int.c-95-                    return ret;
drivers/char/ipmi/ipmb_dev_int.c-96-
--

0
2021-06-25 11:03:47

What Others Think

This is definitely an article with valuable information that I was looking for. So I'd love to thank you for the effort you've made in writing this information. smash karts
algerroberts · 4 weeks and 6 days ago
voip phone system service provider Life is a journey, you don’t care about the destination, you care about the scenery along the way and the mood of seeing the scenery. Others laughed at me as crazy, I laughed at others and couldn't see through.
oplfbasd · 4 weeks and 3 days ago
Thank you for sharing this article. I appreciate the effort you took to write it. Please make more posts like this I will continue to support you geometry dash
kennedystewart · 4 weeks and 3 days ago
[url=https://www.chips999.com/????????????/?????/]??? ????? ??? ?? ??????[/url]
McauleyHanna · 4 weeks and 1 day ago
[url=https://www.chips999.com/????????????/?????/]??? ????? ??? ?? ??????[/url]
McauleyHanna · 4 weeks and 1 day ago
??? ????? ??? ?? ??????
McauleyHanna · 4 weeks and 1 day ago
business voip service If you intend to take your service to the following degree, you must consider establishing an online service contact number. With a virtual organization number, you can boost the performance of your organization. In this message, we will take a look at digital business numbers and also how you can get up as well as running with one for your organization. Let's start.
Annieding5317 · 4 weeks and 1 day ago
This was very helpful. I have been searching for similar code. Since I am new to this platform, these sort of forums have been helpful for me. Great job. Documentation Consultancy in Dubai
Stellaosbern · 3 weeks and 4 days ago
Can be replaced by The --cc limits the search to C code, -i to ignore case, -A4 because most wait_event variants have 4 arguments that may be on lines after the function name. Use --make to search makefiles in venge io
AnnaX · 3 weeks and 2 days ago
Thanks for this great blog of yours. I am amazed of what you've share. This is so informative. Keep sharing with us. Click Here
johnlead · 3 weeks and 1 day ago
Danke! mehr Abonnenten auf Instagram
michalkaluba18 · 2 weeks and 3 days ago
Our Company Best Exam Help provides assignment help is available to students who find it difficult to concentrate on their studies. Feel free to contact me with any questions or for assistance. My team and I are here to assist you with your exams.
bestexamshelp · 4 days ago
Thank you for sharing this! I was looking for a similar code and you helped me a lot in this. I can't even imagine how much more time I would have to spend to find the necessary information. By the way on engre.co/services/r-d/it-engineering/ you can find a company for research and development in the field of information technology. This is a good platform to host your business. I hope this will be useful.
klarkwhite · 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: