{"action":"created","comment":{"url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/comments/57366298","id":57366298,"diff_hunk":"@@ -0,0 +1,484 @@\n+/*\n+ * Copyright (C) 2016  Red Hat, Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ * Author: Vratislav Podzimek <vpodzime@redhat.com>\n+ */\n+\n+#include <exec.h>\n+#include <unistd.h>\n+#include <fcntl.h>\n+#include <string.h>\n+#include <blkid.h>\n+\n+#include \"fs.h\"\n+\n+/**\n+ * SECTION: fs\n+ * @short_description: plugin for operations with file systems\n+ * @title: FS\n+ * @include: fs.h\n+ *\n+ * A plugin for operations with file systems\n+ */\n+\n+/**\n+ * bd_fs_error_quark: (skip)\n+ */\n+GQuark bd_fs_error_quark (void)\n+{\n+    return g_quark_from_static_string (\"g-bd-fs-error-quark\");\n+}\n+\n+/**\n+ * bd_fs_ext4_info_copy: (skip)\n+ *\n+ * Creates a new copy of @data.\n+ */\n+BDFSExt4Info* bd_fs_ext4_info_copy (BDFSExt4Info *data) {\n+    BDFSExt4Info *ret = g_new0 (BDFSExt4Info, 1);\n+\n+    ret->label = g_strdup (data->label);\n+    ret->uuid = g_strdup (data->uuid);\n+    ret->state = g_strdup (data->state);\n+    ret->block_size = data->block_size;\n+    ret->block_count = data->block_count;\n+    ret->free_blocks = data->free_blocks;\n+    ret->mount_count = data->mount_count;\n+\n+    return ret;\n+}\n+\n+/**\n+ * bd_fs_ext4_info_free: (skip)\n+ *\n+ * Frees @data.\n+ */\n+void bd_fs_ext4_info_free (BDFSExt4Info *data) {\n+    g_free (data->label);\n+    g_free (data->uuid);\n+    g_free (data->state);\n+    g_free (data);\n+}\n+\n+/**\n+ * check: (skip)\n+ */\n+gboolean check() {\n+    GError *error = NULL;\n+    gboolean ret = bd_utils_check_util_version (\"mkfs.ext4\", NULL, \"\", NULL, &error);\n+\n+    if (!ret && error) {\n+        g_warning(\"Cannot load the FS plugin: %s\" , error->message);\n+        g_clear_error (&error);\n+    }\n+    return ret;\n+}\n+\n+static gint synced_close (gint fd) {\n+    gint ret = 0;\n+    ret = fsync (fd);\n+    if (close (fd) != 0)\n+        ret = 1;\n+    return ret;\n+}\n+\n+/**\n+ * bd_fs_wipe:\n+ * @device: the device to wipe signatures from\n+ * @all: whether to wipe all (%TRUE) signatures or just the first (%FALSE) one\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether signagures were successfully wiped on @device or not\n+ */\n+gboolean bd_fs_wipe (gchar *device, gboolean all, GError **error) {\n+    blkid_probe probe = NULL;\n+    gint fd = 0;\n+    gint status = 0;\n+\n+    probe = blkid_new_probe ();\n+    if (!probe) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        return FALSE;\n+    }\n+\n+    fd = open (device, O_RDWR|O_CLOEXEC);\n+    if (fd == -1) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        return FALSE;\n+    }\n+\n+    status = blkid_probe_set_device (probe, fd, 0, 0);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+\tblkid_probe_enable_partitions(probe, 1);\n+\tblkid_probe_set_partitions_flags(probe, BLKID_PARTS_MAGIC);\n+\tblkid_probe_enable_superblocks(probe, 1);\n+\tblkid_probe_set_superblocks_flags(probe, BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_BADCSUM);\n+\n+    status = blkid_do_probe (probe);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to probe the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+    status = blkid_do_wipe (probe, FALSE);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to wipe signatures on the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+    while (all && (blkid_do_probe (probe) == 0)) {\n+        status = blkid_do_wipe (probe, FALSE);\n+        if (status != 0) {\n+            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                         \"Failed to wipe signatures on the device '%s'\", device);\n+            blkid_free_probe (probe);\n+            synced_close (fd);\n+            return FALSE;\n+        }\n+    }\n+\n+    blkid_free_probe (probe);\n+    synced_close (fd);\n+\n+    return TRUE;\n+}\n+\n+static gboolean wipe_fs (gchar *device, gchar *fs_type, GError **error) {\n+    blkid_probe probe = NULL;\n+    gint fd = 0;\n+    gint status = 0;\n+    const gchar *value = NULL;\n+    size_t len = 0;\n+\n+    probe = blkid_new_probe ();\n+    if (!probe) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        return FALSE;\n+    }\n+\n+    fd = open (device, O_RDWR|O_CLOEXEC);\n+    if (fd == -1) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        return FALSE;\n+    }\n+\n+    status = blkid_probe_set_device (probe, fd, 0, 0);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to create a probe for the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+\tblkid_probe_enable_partitions(probe, 1);\n+\tblkid_probe_set_partitions_flags(probe, BLKID_PARTS_MAGIC);\n+\tblkid_probe_enable_superblocks(probe, 1);\n+\tblkid_probe_set_superblocks_flags(probe, BLKID_SUBLKS_USAGE | BLKID_SUBLKS_TYPE |\n+                                             BLKID_SUBLKS_MAGIC | BLKID_SUBLKS_BADCSUM);\n+\n+    status = blkid_do_probe (probe);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to probe the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+    status = blkid_probe_lookup_value (probe, \"USAGE\", &value, NULL);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to get signature type for the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+    if (strncmp (value, \"filesystem\", 10) != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_INVAL,\n+                     \"The signature on the device '%s' is of type '%s', not 'filesystem'\", device, value);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+    if (fs_type) {\n+        status = blkid_probe_lookup_value (probe, \"TYPE\", &value, &len);\n+        if (status != 0) {\n+            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                         \"Failed to get filesystem type for the device '%s'\", device);\n+            blkid_free_probe (probe);\n+            synced_close (fd);\n+            return FALSE;\n+        }\n+\n+        if (strncmp (value, fs_type, len-1) != 0) {\n+            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_INVAL,\n+                         \"The file system type on the device '%s' is '%s', not '%s'\", device, value, fs_type);\n+            blkid_free_probe (probe);\n+            synced_close (fd);\n+            return FALSE;\n+        }\n+    }\n+\n+    status = blkid_do_wipe (probe, FALSE);\n+    if (status != 0) {\n+        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n+                     \"Failed to wipe the filesystem signature on the device '%s'\", device);\n+        blkid_free_probe (probe);\n+        synced_close (fd);\n+        return FALSE;\n+    }\n+\n+    blkid_free_probe (probe);\n+    synced_close (fd);\n+    return TRUE;\n+}\n+\n+/**\n+ * bd_fs_ext4_mkfs:\n+ * @device: the device to create a new ext4 fs on\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether a new ext4 fs was successfully created on @device or not\n+ */\n+gboolean bd_fs_ext4_mkfs (gchar *device, GError **error) {\n+    gchar *args[3] = {\"mkfs.ext4\", device, NULL};\n+\n+    return bd_utils_exec_and_report_error (args, error);\n+}\n+\n+/**\n+ * bd_fs_ext4_wipe:\n+ * @device: the device to wipe an ext4 signature from\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether an ext4 signature was successfully wiped from the @device or\n+ *          not\n+ */\n+gboolean bd_fs_ext4_wipe (gchar *device, GError **error) {\n+    return wipe_fs (device, \"ext4\", error);\n+}\n+\n+/**\n+ * bd_fs_ext4_check:\n+ * @device: the device the file system on which to check\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether an ext4 file system on the @device is clean or not\n+ */\n+gboolean bd_fs_ext4_check (gchar *device, GError **error) {\n+    /* Force checking even if the file system seems clean. AND\n+     * Open the filesystem read-only, and assume an answer of no to all\n+     * questions. */\n+    gchar *args[5] = {\"e2fsck\", \"-f\", \"-n\", device, NULL};\n+    gint status = 0;\n+    gboolean ret = FALSE;\n+\n+    ret = bd_utils_exec_and_report_status_error (args, &status, error);\n+    if (!ret && (status == 4)) {\n+        /* no error should be reported for exit code 4 - File system errors left uncorrected */\n+        g_clear_error (error);\n+    }\n+    return ret;\n+}\n+\n+/**\n+ * bd_fs_ext4_repair:\n+ * @device: the device the file system on which to repair\n+ * @unsafe: whether to do unsafe operations too\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether an ext4 file system on the @device was successfully repaired\n+ *          (if needed) or not (error is set in that case)\n+ */\n+gboolean bd_fs_ext4_repair (gchar *device, gboolean unsafe, GError **error) {\n+    /* Force checking even if the file system seems clean. AND\n+     *     Automatically repair what can be safely repaired. OR\n+     *     Assume an answer of `yes' to all questions. */\n+    gchar *args[5] = {\"e2fsck\", \"-f\", unsafe ? \"-y\" : \"-p\", device, NULL};\n+\n+    return bd_utils_exec_and_report_error (args, error);\n+}\n+\n+/**\n+ * bd_fs_ext4_set_label:\n+ * @device: the device the file system on which to set label for\n+ * @label: label to set\n+ * @error: (out): place to store error (if any)\n+ *\n+ * Returns: whether the label of ext4 file system on the @device was\n+ *          successfully set or not\n+ */\n+gboolean bd_fs_ext4_set_label (gchar *device, gchar *label, GError **error) {\n+    gchar *args[5] = {\"tune2fs\", \"-L\", label, device, NULL};\n+\n+    return bd_utils_exec_and_report_error (args, error);\n+}\n+\n+/**\n+ * parse_mdadm_vars: (skip)","path":"src/plugins/fs.c","position":352,"original_position":352,"commit_id":"3e975261efcfbcc8d994fc00dc039ae32028bedc","original_commit_id":"3e975261efcfbcc8d994fc00dc039ae32028bedc","user":{"login":"vpodzime","id":1044278,"avatar_url":"https://avatars.githubusercontent.com/u/1044278?v=3","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"body":"Good catch, thanks! Fixing.","created_at":"2016-03-24T18:35:28Z","updated_at":"2016-03-24T18:35:28Z","html_url":"https://github.com/rhinstaller/libblockdev/pull/74#discussion_r57366298","pull_request_url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/comments/57366298"},"html":{"href":"https://github.com/rhinstaller/libblockdev/pull/74#discussion_r57366298"},"pull_request":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74","id":63739223,"html_url":"https://github.com/rhinstaller/libblockdev/pull/74","diff_url":"https://github.com/rhinstaller/libblockdev/pull/74.diff","patch_url":"https://github.com/rhinstaller/libblockdev/pull/74.patch","issue_url":"https://api.github.com/repos/rhinstaller/libblockdev/issues/74","number":74,"state":"open","locked":false,"title":"First pieces of the 'fs' plugin","user":{"login":"vpodzime","id":1044278,"avatar_url":"https://avatars.githubusercontent.com/u/1044278?v=3","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"body":"Support for the *ext4* file system.","created_at":"2016-03-22T15:27:54Z","updated_at":"2016-03-24T18:35:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e1f0f9369f9a2b3910a3f6e4939916147cbf3ce","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74/commits","review_comments_url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74/comments","review_comment_url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rhinstaller/libblockdev/issues/74/comments","statuses_url":"https://api.github.com/repos/rhinstaller/libblockdev/statuses/3e975261efcfbcc8d994fc00dc039ae32028bedc","head":{"label":"vpodzime:master-fs_ext4_pr","ref":"master-fs_ext4_pr","sha":"3e975261efcfbcc8d994fc00dc039ae32028bedc","user":{"login":"vpodzime","id":1044278,"avatar_url":"https://avatars.githubusercontent.com/u/1044278?v=3","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"repo":{"id":32576806,"name":"libblockdev","full_name":"vpodzime/libblockdev","owner":{"login":"vpodzime","id":1044278,"avatar_url":"https://avatars.githubusercontent.com/u/1044278?v=3","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vpodzime/libblockdev","description":"A library for manipulating block devices. ","fork":true,"url":"https://api.github.com/repos/vpodzime/libblockdev","forks_url":"https://api.github.com/repos/vpodzime/libblockdev/forks","keys_url":"https://api.github.com/repos/vpodzime/libblockdev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vpodzime/libblockdev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vpodzime/libblockdev/teams","hooks_url":"https://api.github.com/repos/vpodzime/libblockdev/hooks","issue_events_url":"https://api.github.com/repos/vpodzime/libblockdev/issues/events{/number}","events_url":"https://api.github.com/repos/vpodzime/libblockdev/events","assignees_url":"https://api.github.com/repos/vpodzime/libblockdev/assignees{/user}","branches_url":"https://api.github.com/repos/vpodzime/libblockdev/branches{/branch}","tags_url":"https://api.github.com/repos/vpodzime/libblockdev/tags","blobs_url":"https://api.github.com/repos/vpodzime/libblockdev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vpodzime/libblockdev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vpodzime/libblockdev/git/refs{/sha}","trees_url":"https://api.github.com/repos/vpodzime/libblockdev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vpodzime/libblockdev/statuses/{sha}","languages_url":"https://api.github.com/repos/vpodzime/libblockdev/languages","stargazers_url":"https://api.github.com/repos/vpodzime/libblockdev/stargazers","contributors_url":"https://api.github.com/repos/vpodzime/libblockdev/contributors","subscribers_url":"https://api.github.com/repos/vpodzime/libblockdev/subscribers","subscription_url":"https://api.github.com/repos/vpodzime/libblockdev/subscription","commits_url":"https://api.github.com/repos/vpodzime/libblockdev/commits{/sha}","git_commits_url":"https://api.github.com/repos/vpodzime/libblockdev/git/commits{/sha}","comments_url":"https://api.github.com/repos/vpodzime/libblockdev/comments{/number}","issue_comment_url":"https://api.github.com/repos/vpodzime/libblockdev/issues/comments{/number}","contents_url":"https://api.github.com/repos/vpodzime/libblockdev/contents/{+path}","compare_url":"https://api.github.com/repos/vpodzime/libblockdev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vpodzime/libblockdev/merges","archive_url":"https://api.github.com/repos/vpodzime/libblockdev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vpodzime/libblockdev/downloads","issues_url":"https://api.github.com/repos/vpodzime/libblockdev/issues{/number}","pulls_url":"https://api.github.com/repos/vpodzime/libblockdev/pulls{/number}","milestones_url":"https://api.github.com/repos/vpodzime/libblockdev/milestones{/number}","notifications_url":"https://api.github.com/repos/vpodzime/libblockdev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vpodzime/libblockdev/labels{/name}","releases_url":"https://api.github.com/repos/vpodzime/libblockdev/releases{/id}","deployments_url":"https://api.github.com/repos/vpodzime/libblockdev/deployments","created_at":"2015-03-20T10:12:19Z","updated_at":"2015-05-05T08:22:53Z","pushed_at":"2016-03-23T15:51:03Z","git_url":"git://github.com/vpodzime/libblockdev.git","ssh_url":"git@github.com:vpodzime/libblockdev.git","clone_url":"https://github.com/vpodzime/libblockdev.git","svn_url":"https://github.com/vpodzime/libblockdev","homepage":"","size":1021,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rhinstaller:master","ref":"master","sha":"37023f392450aa3fa3c870f210219c2c0b5f3b06","user":{"login":"rhinstaller","id":10549274,"avatar_url":"https://avatars.githubusercontent.com/u/10549274?v=3","gravatar_id":"","url":"https://api.github.com/users/rhinstaller","html_url":"https://github.com/rhinstaller","followers_url":"https://api.github.com/users/rhinstaller/followers","following_url":"https://api.github.com/users/rhinstaller/following{/other_user}","gists_url":"https://api.github.com/users/rhinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/rhinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhinstaller/subscriptions","organizations_url":"https://api.github.com/users/rhinstaller/orgs","repos_url":"https://api.github.com/users/rhinstaller/repos","events_url":"https://api.github.com/users/rhinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/rhinstaller/received_events","type":"Organization","site_admin":false},"repo":{"id":19988938,"name":"libblockdev","full_name":"rhinstaller/libblockdev","owner":{"login":"rhinstaller","id":10549274,"avatar_url":"https://avatars.githubusercontent.com/u/10549274?v=3","gravatar_id":"","url":"https://api.github.com/users/rhinstaller","html_url":"https://github.com/rhinstaller","followers_url":"https://api.github.com/users/rhinstaller/followers","following_url":"https://api.github.com/users/rhinstaller/following{/other_user}","gists_url":"https://api.github.com/users/rhinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/rhinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhinstaller/subscriptions","organizations_url":"https://api.github.com/users/rhinstaller/orgs","repos_url":"https://api.github.com/users/rhinstaller/repos","events_url":"https://api.github.com/users/rhinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/rhinstaller/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rhinstaller/libblockdev","description":"A library for manipulating block devices. ","fork":false,"url":"https://api.github.com/repos/rhinstaller/libblockdev","forks_url":"https://api.github.com/repos/rhinstaller/libblockdev/forks","keys_url":"https://api.github.com/repos/rhinstaller/libblockdev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhinstaller/libblockdev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhinstaller/libblockdev/teams","hooks_url":"https://api.github.com/repos/rhinstaller/libblockdev/hooks","issue_events_url":"https://api.github.com/repos/rhinstaller/libblockdev/issues/events{/number}","events_url":"https://api.github.com/repos/rhinstaller/libblockdev/events","assignees_url":"https://api.github.com/repos/rhinstaller/libblockdev/assignees{/user}","branches_url":"https://api.github.com/repos/rhinstaller/libblockdev/branches{/branch}","tags_url":"https://api.github.com/repos/rhinstaller/libblockdev/tags","blobs_url":"https://api.github.com/repos/rhinstaller/libblockdev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhinstaller/libblockdev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhinstaller/libblockdev/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhinstaller/libblockdev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhinstaller/libblockdev/statuses/{sha}","languages_url":"https://api.github.com/repos/rhinstaller/libblockdev/languages","stargazers_url":"https://api.github.com/repos/rhinstaller/libblockdev/stargazers","contributors_url":"https://api.github.com/repos/rhinstaller/libblockdev/contributors","subscribers_url":"https://api.github.com/repos/rhinstaller/libblockdev/subscribers","subscription_url":"https://api.github.com/repos/rhinstaller/libblockdev/subscription","commits_url":"https://api.github.com/repos/rhinstaller/libblockdev/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhinstaller/libblockdev/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhinstaller/libblockdev/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhinstaller/libblockdev/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhinstaller/libblockdev/contents/{+path}","compare_url":"https://api.github.com/repos/rhinstaller/libblockdev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhinstaller/libblockdev/merges","archive_url":"https://api.github.com/repos/rhinstaller/libblockdev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhinstaller/libblockdev/downloads","issues_url":"https://api.github.com/repos/rhinstaller/libblockdev/issues{/number}","pulls_url":"https://api.github.com/repos/rhinstaller/libblockdev/pulls{/number}","milestones_url":"https://api.github.com/repos/rhinstaller/libblockdev/milestones{/number}","notifications_url":"https://api.github.com/repos/rhinstaller/libblockdev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhinstaller/libblockdev/labels{/name}","releases_url":"https://api.github.com/repos/rhinstaller/libblockdev/releases{/id}","deployments_url":"https://api.github.com/repos/rhinstaller/libblockdev/deployments","created_at":"2014-05-20T16:44:55Z","updated_at":"2016-03-16T07:53:38Z","pushed_at":"2016-03-23T15:51:03Z","git_url":"git://github.com/rhinstaller/libblockdev.git","ssh_url":"git@github.com:rhinstaller/libblockdev.git","clone_url":"https://github.com/rhinstaller/libblockdev.git","svn_url":"https://github.com/rhinstaller/libblockdev","homepage":"","size":1088,"stargazers_count":11,"watchers_count":11,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":7,"forks":10,"open_issues":7,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74"},"html":{"href":"https://github.com/rhinstaller/libblockdev/pull/74"},"issue":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/issues/74"},"comments":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/rhinstaller/libblockdev/statuses/3e975261efcfbcc8d994fc00dc039ae32028bedc"}}}}