File: inode_extref_hash.py

package info (click to toggle)
python-btrfs 15-1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 620 kB
  • sloc: python: 4,772; makefile: 195
file content (12 lines) | stat: -rwxr-xr-x 261 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/python3

import btrfs
import sys

if len(sys.argv) < 3:
    print("Usage: {} <parent_objectid> <name>".format(sys.argv[0]))
    sys.exit(1)

parent_objectid = int(sys.argv[1])
name = sys.argv[2]
print(btrfs.crc32c.extref_hash(parent_objectid, name))