Skip to content

Instantly share code, notes, and snippets.

@wmealing
Created February 6, 2018 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmealing/8be838c66a67bcb087dd31f245766eb9 to your computer and use it in GitHub Desktop.
Save wmealing/8be838c66a67bcb087dd31f245766eb9 to your computer and use it in GitHub Desktop.
#+BEGIN_SRC sh
ag 'static int lo_release' .
#+END_SRC
#+results:
: static int lo_release(struct gendisk *disk, fmode_t mode)
#+NAME:function-match-rhel6
#+BEGIN_SRC sh
grep -h --include='*.c' "static int lo_release" * -R -A 5
#+END_SRC
#+RESULTS: function-match-rhel6
: static int lo_release(struct gendisk *disk, fmode_t mode)
: {
: struct loop_device *lo = disk->private_data;
: int err;
:
: mutex_lock(&lo->lo_ctl_mutex);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment