Re: [PATCH v3 1/2] rust: Introduce file_from_location()

From: John Hubbard
Date: Tue Jun 17 2025 - 16:34:07 EST


On 6/17/25 11:22 AM, Miguel Ojeda wrote:
On Tue, Jun 17, 2025 at 8:12 PM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:

How aobut something below? (I use "" instead of `` on purpose because
the output variable there is a string)

Looks much better, thanks!

You mean it should be "with an NUL terminated"? Or it should be "with
a `NUL` byte terminated"?

Ah, I meant that "terminated" sounded strange to me, i.e. it sounds as
if the NUL is what is terminated. But I am not a native speaker.

I would have expected e.g. "a NUL terminated string" or variations
like "a string terminated with a NUL" or"a string with a NUL
termination byte", if that makes sense.


Yes, instead of this:

"guarantees to return a string with a NUL terminated."

...you will want this:

"guarantees to return a NUL-terminated string."

And depending on whether you prefer to speak Kernel, or R4L here,
note that the kernel normally spells this as NULL (two L's).

thanks,
John Hubbard