/src/getsize.c (5d8818314ffc42c3ea80d3bea87f8fd076613bee) (699 bytes) (mode 100644) (type blob)
#include "config.h"
/*
* getsize.c --- get the size of a partition.
*
* Copyright (C) 1995, 1995 Theodore Ts'o.
* Copyright (C) 2010 Karel Zak <kzak@redhat.com>
*
* %Begin-Header%
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
* %End-Header%
*/
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "nyanlibblkid_namespace.h"
#include "blkidP.h"
/**
* blkid_get_dev_size:
* @fd: file descriptor
*
* Returns: size (in bytes) of the block device or size of the regular file or 0.
*/
blkid_loff_t blkid_get_dev_size(int fd)
{
unsigned long long bytes;
if (blkdev_get_size(fd, &bytes))
return 0;
return bytes;
}
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
24 |
20ff7cb125a29d358b42d1030371e16c440fbaa0 |
LICENSE |
100644 |
blob |
368 |
6ba7bd4c2760f53fd5fe0502d87f587115674e56 |
README |
100644 |
blob |
224 |
a10f019c24805224582c8142bbfc6b09a4bc4910 |
blkid.pc.in |
100644 |
blob |
3887 |
65e4e22b7689e58e2b04f136f653aebd4741bf73 |
libblkid.sym |
100755 |
blob |
9841 |
208fb88ce299e67147009e227ffd84613f88d549 |
make |
100644 |
blob |
2361 |
9eaf3c0fa7ca0d061d6c56540b49b49276bfa5be |
make.blkid.sh |
100644 |
blob |
2814 |
2668f2430a660b8a6b5b5aec3afe5e36ea2492bb |
make.libblkid.sh |
040000 |
tree |
- |
bb686abb07ee14387f089c98a41befa98ae70417 |
src |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/nyanblkid
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/nyanblkid
Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/nyanblkid
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main