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 · 22 weeks and 1 day 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 · 21 weeks and 5 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 · 21 weeks and 5 days ago
[url=https://www.chips999.com/????????????/?????/]??? ????? ??? ?? ??????[/url]
McauleyHanna · 21 weeks and 3 days ago
[url=https://www.chips999.com/????????????/?????/]??? ????? ??? ?? ??????[/url]
McauleyHanna · 21 weeks and 3 days ago
??? ????? ??? ?? ??????
McauleyHanna · 21 weeks and 3 days 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 · 21 weeks and 3 days 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 · 20 weeks and 5 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 · 20 weeks and 4 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 · 20 weeks and 2 days ago
Danke! mehr Abonnenten auf Instagram
michalkaluba18 · 19 weeks and 5 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 · 17 weeks and 5 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 · 17 weeks and 3 days ago
Thanks, Your post is an excellent example of why I keep coming back to read your excellent quality content…. caluanie muelear oxidize for sale
robinjack · 15 weeks and 6 days ago
It is actually a nice and helpful piece of information. I am happy that you just shared this useful information with us. Please keep us up to date like this. Thanks for sharing.222 twin flame union
alberthuddles · 10 weeks and 2 days ago
It is actually a nice and helpful piece of information. I am happy that you just shared this useful information with us. Please keep us up to date like this. Thanks for sharing.adviseastro
alberthuddles · 10 weeks and 2 days ago
I was impressed with the site that you created, so memotipasi many people to be more advanced, there also kunjugi me, as a comparison.kaidoo.co
Geekstation · 10 weeks and 1 day ago
This is a great article! I really like the way you present it and the way you make it interesting moto x3m
Shakari · 10 weeks and 1 day ago
I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up..?????????
Geekstation · 9 weeks and 6 days ago
I have added and shared your site to my social media accounts to send people back to your site because I am sure they will find it extremely helpful too. .??????? lsm99
Geekstation · 9 weeks and 6 days ago
pakistani jewelry online store
sarahleoh · 9 weeks and 5 days ago
there are many greeting card options that you can see in online stores but i love those that generate cute sounds- vegan food
robinjack · 9 weeks and 4 days ago
I’m impressed, I must say. Truly rarely do I encounter a weblog that’s both educative and entertaining, and without a doubt, you might have hit the nail about the head. Your concept is outstanding; the problem is something which too few people are speaking intelligently about. We are happy which i found this around my look for something regarding this. contadores cancun
robinjack · 9 weeks and 2 days ago
You've created so many great articles here, that I've read yours a few times. Much of your point of view is in line with mine. This is great content for your readers. Please keep sharing! girls games
among · 6 weeks and 5 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: