Skip to content

Commit

Permalink
Allow passing options to deconfigure/2
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcarstens authored and fhunleth committed Jan 21, 2020
1 parent 160f011 commit a6f4080
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/vintage_net.ex
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,12 @@ defmodule VintageNet do

@doc """
Deconfigure settings for a specified interface.
Supports same options as `configure/3`
"""
@spec deconfigure(ifname()) :: :ok | {:error, any()}
def deconfigure(ifname) do
configure(ifname, %{type: VintageNet.Technology.Null})
@spec deconfigure(ifname(), configure_options()) :: :ok | {:error, any()}
def deconfigure(ifname, options \\ []) do
configure(ifname, %{type: VintageNet.Technology.Null}, options)
end

@doc """
Expand Down

0 comments on commit a6f4080

Please sign in to comment.