/* * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include /* IRIX interpretation of an uuid_t */ typedef struct { __be32 uu_timelow; __be16 uu_timemid; __be16 uu_timehi; __be16 uu_clockseq; __be16 uu_node[3]; } xfs_uu_t; /* * uuid_getnodeuniq - obtain the node unique fields of a UUID. * * This is not in any way a standard or condoned UUID function; * it just something that's needed for user-level file handles. */ void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]) { xfs_uu_t *uup = (xfs_uu_t *)uuid; fsid[0] = (be16_to_cpu(uup->uu_clockseq) << 16) | be16_to_cpu(uup->uu_timemid); fsid[1] = be32_to_cpu(uup->uu_timelow); } int uuid_is_nil(uuid_t *uuid) { int i; char *cp = (char *)uuid; if (uuid == NULL) return 0; /* implied check of version number here... */ for (i = 0; i < sizeof *uuid; i++) if (*cp++) return 0; /* not nil */ return 1; /* is nil */ } int uuid_equal(uuid_t *uuid1, uuid_t *uuid2) { return memcmp(uuid1, uuid2, sizeof(uuid_t)) ? 0 : 1; } ve'>summaryrefslogtreecommitdiff
path: root/tools/build/feature/test-glibc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-15 12:09:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-15 12:09:13 -0700
commitdf34d04a6f09ba41037e58c3df6d6fbed0ffcde9 (patch)
tree13c81a36713fafc7abd74cb337860a1feb279968 /tools/build/feature/test-glibc.c
parent9ffc66941df278c9f4df979b6bcf6c6ddafedd16 (diff)
parenta17e7d2010b44103e3b8e00d0c8c510606457bc6 (diff)
Merge tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs
Pull befs fixes from Luis de Bethencourt: "I recently took maintainership of the befs file system [0]. This is the first time I send you a git pull request, so please let me know if all the below is OK. Salah Triki and myself have been cleaning the code and fixing a few small bugs. Sorry I couldn't send this sooner in the merge window, I was waiting to have my GPG key signed by kernel members at ELCE in Berlin a few days ago." [0] https://lkml.org/lkml/2016/7/27/502 * tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs: (39 commits) befs: befs: fix style issues in datastream.c befs: improve documentation in datastream.c befs: fix typos in datastream.c befs: fix typos in btree.c befs: fix style issues in super.c befs: fix comment style befs: add check for ag_shift in superblock befs: dump inode_size superblock information befs: remove unnecessary initialization befs: fix typo in befs_sb_info befs: add flags field to validate superblock state befs: fix typo in befs_find_key befs: remove unused BEFS_BT_PARMATCH fs: befs: remove ret variable fs: befs: remove in vain variable assignment fs: befs: remove unnecessary *befs_sb variable fs: befs: remove useless initialization to zero fs: befs: remove in vain variable assignment fs: befs: Insert NULL inode to dentry fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect ...
Diffstat (limited to 'tools/build/feature/test-glibc.c')