Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qbar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
qbar
Commits
b35121a7
Commit
b35121a7
authored
4 years ago
by
Mr. Snow Ball / projects
Browse files
Options
Downloads
Patches
Plain Diff
Fix warnings
parent
e2807646
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/QBar/Qubes/AdminAPI.hs
+4
-3
4 additions, 3 deletions
src/QBar/Qubes/AdminAPI.hs
with
4 additions
and
3 deletions
src/QBar/Qubes/AdminAPI.hs
+
4
−
3
View file @
b35121a7
module
QBar.Qubes.AdminAPI
where
module
QBar.Qubes.AdminAPI
where
import
Control.Monad
(
forM
)
import
Control.Monad
(
forM
_
)
import
Data.Binary
import
Data.Binary
import
Data.Binary.Get
import
Data.Binary.Get
import
Data.Binary.Put
import
Data.Binary.Put
...
@@ -21,6 +21,7 @@ data QubesAdminReturn
...
@@ -21,6 +21,7 @@ data QubesAdminReturn
|
Exception
{
excType
::
BL
.
ByteString
,
excTraceback
::
BL
.
ByteString
,
excFormatString
::
BL
.
ByteString
,
excFields
::
[
BL
.
ByteString
]
}
|
Exception
{
excType
::
BL
.
ByteString
,
excTraceback
::
BL
.
ByteString
,
excFormatString
::
BL
.
ByteString
,
excFields
::
[
BL
.
ByteString
]
}
deriving
(
Eq
,
Ord
,
Show
,
Read
)
deriving
(
Eq
,
Ord
,
Show
,
Read
)
putLazyByteStringNul
::
BL
.
ByteString
->
Put
putLazyByteStringNul
x
=
do
putLazyByteStringNul
x
=
do
when
(
0
`
BL
.
elem
`
x
)
$
error
"string mustn't contain any
\\
x00 bytes"
when
(
0
`
BL
.
elem
`
x
)
$
error
"string mustn't contain any
\\
x00 bytes"
putLazyByteString
x
putLazyByteString
x
...
@@ -34,7 +35,7 @@ instance Binary QubesAdminReturn where
...
@@ -34,7 +35,7 @@ instance Binary QubesAdminReturn where
putWord8
0x31
>>
putWord8
0x00
putWord8
0x31
>>
putWord8
0x00
putLazyByteStringNul
evSubject
putLazyByteStringNul
evSubject
putLazyByteStringNul
evEvent
putLazyByteStringNul
evEvent
forM
evProperties
$
\
(
k
,
v
)
->
do
forM
_
evProperties
$
\
(
k
,
v
)
->
do
putLazyByteStringNul
k
putLazyByteStringNul
k
putLazyByteStringNul
v
putLazyByteStringNul
v
putWord8
0x00
putWord8
0x00
...
@@ -43,7 +44,7 @@ instance Binary QubesAdminReturn where
...
@@ -43,7 +44,7 @@ instance Binary QubesAdminReturn where
putLazyByteStringNul
excType
putLazyByteStringNul
excType
putLazyByteStringNul
excTraceback
putLazyByteStringNul
excTraceback
putLazyByteStringNul
excFormatString
putLazyByteStringNul
excFormatString
forM
excFields
putLazyByteStringNul
forM
_
excFields
putLazyByteStringNul
putWord8
0x00
putWord8
0x00
get
=
do
get
=
do
msgType
<-
getWord8
msgType
<-
getWord8
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment