Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys: add BLK* constants (specifically BLKGETSIZE64 and BLKRRPART) #19370

Closed
stapelberg opened this issue Mar 2, 2017 · 3 comments
Closed

Comments

@stapelberg
Copy link
Contributor

I’m about to send the following change for review, adding the BLK* constants which I’m using in a program to re-read the partition table:

--- i/unix/mkerrors.sh
+++ w/unix/mkerrors.sh
@@ -353,7 +353,8 @@ ccflags="$@"
                $2 ~ /^GRND_/ ||
                $2 ~ /^SPLICE_/ ||
                $2 !~ "WMESGLEN" &&
-               $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
+               $2 ~ /^W[A-Z0-9]+$/ ||
+               $2 ~ /^BLK/ {printf("\t%s = C.%s\n", $2, $2)}
                $2 ~ /^__WCOREFLAG$/ {next}
                $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}

I have a question about the process, though: when running GOARCH=amd64 GOOS=linux ./mkerrors.sh -m64 |gofmt >zerrors_linux_amd64.go I get a significant diff. I’m running the command on a Debian stretch system with linux-libc-dev 4.9.2-2.

Should the command be run on a specific system? If so, which one? Is there documentation about this which I’ve missed?

@ianlancetaylor
Copy link
Contributor

Diffs are unfortunately expected, for various historical reasons. The workaround is to run the script and then discard any changes unrelated to what you are doing. At some point we should try to clean this up, but of course that should be independent of any real changes.

@bradfitz
Copy link
Contributor

bradfitz commented Mar 2, 2017

Cleaning up the process for regenerating the files is bug #15282.

@gopherbot
Copy link

CL https://golang.org/cl/37640 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants