kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: is there a macro symbol for strlen($LINUX_SOURCE_PATH)
Date: Wed, 4 Sep 2019 15:42:01 -0600	[thread overview]
Message-ID: <CAJfuBxzD8hCj_vetCPLCmOzgHF=dwaayGeNSCZQZwoaOEOvU_g@mail.gmail.com> (raw)

in the kernel, there are a lot of usages of __FILE__

this means that there are a lot of copies of fully rooted paths,
including all the varying ~/src/linux prefixes used by individual builders.

Id hazard a guess that something like __RELPATH_FILE__
would work in many cases and perhaps even be more readable
(by reducing long strings) in the generated output

Do the macros exist to cobble this together for compile-time ?
Does it warrant a short name ? either to wrap __FILE__ uses or replace them ?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2019-09-04 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 21:42 jim.cromie [this message]
2019-09-04 22:18 ` is there a macro symbol for strlen($LINUX_SOURCE_PATH) Varun Iyer
2019-09-05 14:31   ` jim.cromie
2019-09-05 20:23     ` Valdis Klētnieks
2019-09-05  5:47 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJfuBxzD8hCj_vetCPLCmOzgHF=dwaayGeNSCZQZwoaOEOvU_g@mail.gmail.com' \
    --to=jim.cromie@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).