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

FileStat.st_dev issue at splitting to Major and Minor #124

Open
demon36 opened this issue Nov 19, 2018 · 0 comments
Open

FileStat.st_dev issue at splitting to Major and Minor #124

demon36 opened this issue Nov 19, 2018 · 0 comments

Comments

@demon36
Copy link

demon36 commented Nov 19, 2018

when I run this code in java:

	FileStat statBuf = Posix.allocateStat();
	Posix.stat("/home/demon/test", statBuf);
	long dev = statBuf.dev();
	int mj = statBuf.major(statBuf.dev());
	int mi = statBuf.minor(statBuf.dev());

major and minor values have different values than results of this c code:

struct stat statBuf;
stat("/home/demon/test", &statBuf);
int mj = major(statBuf.st_dev);
int mi = minor(statBuf.st_dev);

Although st_dev value is the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant