From 10649ab5c903e4964fc6c68ae078bbf649d10728 Mon Sep 17 00:00:00 2001 From: Inoki Date: Sat, 3 Jul 2021 10:39:52 +0200 Subject: [PATCH] Temporarilly remove device path stuff --- qefientry.cpp | 22 ---------------------- qefientryrebootview.cpp | 3 ++- qefientryview.cpp | 3 ++- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/qefientry.cpp b/qefientry.cpp index da1db4b..20769fc 100644 --- a/qefientry.cpp +++ b/qefientry.cpp @@ -2,12 +2,6 @@ #include -extern "C" { -#include -#include -#include -} - QString QEFIEntry::name() const { return m_name; @@ -42,22 +36,6 @@ QEFIEntry::QEFIEntry(quint16 id, QByteArray boot_data) } } m_name = entry_name; - - // TODO: Move these code to qefi, add support for Windows - char text_path[4096]; - size_t text_path_len = 4096; - uint16_t pathlen; - ssize_t rc; - efidp dp = NULL; - - efi_load_option *load_option = (efi_load_option *)boot_data.data(); - pathlen = efi_loadopt_pathlen(load_option, boot_data.size()); - dp = efi_loadopt_path(load_option, boot_data.size()); - rc = efidp_format_device_path(text_path, text_path_len, dp, pathlen); - qDebug() << "[" << rc << "]" << text_path; - if (rc > 0) { - m_devicePath = QString(text_path); - } } QEFIEntry::QEFIEntry() {} diff --git a/qefientryrebootview.cpp b/qefientryrebootview.cpp index 985a6d5..ff5b356 100644 --- a/qefientryrebootview.cpp +++ b/qefientryrebootview.cpp @@ -18,7 +18,8 @@ QEFIEntryRebootView::QEFIEntryRebootView(QWidget *parent) m_rebootItemIndex = -1; for (int i = 0; i < m_entryIds.size(); i++) { QEFIEntry &entry = m_entryItems[m_entryIds[i]]; - m_entries->addItem(QString::asprintf("[%04X] ", entry.id()) + entry.name() + "\n" + entry.devicePath()); + m_entries->addItem(QString::asprintf("[%04X] ", entry.id()) + entry.name() + + (entry.devicePath().size() > 0 ? "\n" + entry.devicePath().size() : "")); } QObject::connect(m_entries, &QListWidget::currentRowChanged, this, &QEFIEntryRebootView::entryChanged); diff --git a/qefientryview.cpp b/qefientryview.cpp index 17ec2c7..f14de03 100644 --- a/qefientryview.cpp +++ b/qefientryview.cpp @@ -17,7 +17,8 @@ QEFIEntryView::QEFIEntryView(QWidget *parent) for (int i = 0; i < m_order.size(); i++) { if (m_entryItems.contains(m_order[i])) { QEFIEntry &entry = m_entryItems[m_order[i]]; - m_entries->addItem(QString::asprintf("[%04X] ", entry.id()) + entry.name() + "\n" + entry.devicePath()); + m_entries->addItem(QString::asprintf("[%04X] ", entry.id()) + entry.name() + + (entry.devicePath().size() > 0 ? "\n" + entry.devicePath().size() : "")); } } QObject::connect(m_entries, &QListWidget::currentRowChanged,